First, (Toribash Lua)
[12:53:43] <~ryan> i think an on_specs_update hook would be nice
[12:56:45] <~ryan> so, add_hook('specs_update', '', function(action, nick[, reason]) echo(nick .. " has " .. action .. " the server."); if reason then
echo("(" .. reason .. ")") end) -- specs_change works too
[12:57:51] <~ryan> action is either 'left' or 'joined', nick is obvious and the reason could be 'ping timeout' or 'no response' or whatever
[12:58:38] <~ryan> those [] weren't really necessary but yeah
Thoughts?
Second, I'll probably start working on the site again later, I've suddenly felt the urge to do stuff in Perl. Just cannot get enough RegEx.
I'll probably make
another IRC bot sometime in the next couple of days. I think I'll take a different approach this time: building a database of possible commands and their appropriate responses. Commands should be recognised by RegEx (duh) and the database's response will be eval()'d and the results printed to the channel. I'm not a fan of eval() in any language, but there's an extremely low probability of unintentionally creating malicious code in my database.
That java thingy looked interesting, but it was a bitch to read because of the indentation. Couldn't tell what was in which block. :<
Last edited by Ryan_old2; Mar 8, 2011 at 04:33 PM.