Ril is just a simple IRC “library” that is made to make building IRC bots easier. Instead of focusing on creating functions, and binding messages. Ril is designed so that you can build a completely functional IRC bot within minutes of opening your favorite editor and saving the file. The magic is that you don’t need to handle anything that is on the IRC under layer, only create an object that inherits Ril::RilBot, and start defining your methods, the syntax is as follows:
def on_privmsg(userinfo, target, message)
nick, user, host = userinfo_to_a(userinfo)
puts "<#{nick}/#{target}> #{message}"
end
-or-
def on_375(userinfo, target, message)
@message_of_the_day = ""
end
def on_372(userinfo, target, message)
@message_of_the_day += "#{message}\n"
end
all functions will be called with the three parameters userinfo, target, and message, depending on the type of message it is, may mean that target will be nil, and message will have the data you are looking for, or vice versa, so some IRC protocol knowledge is required. Check out the examples, for more fun!
Thanks for looking, The Ril Tream