Created
June 9, 2011 12:49
-
-
Save anonymous/1016663 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irc = require 'irc' | |
bot = new irc.Client 'hub.irc.hu', 'Arthur', debug:true, channels: ['#nonesuch'] | |
Array::random = -> | |
@[Math.floor Math.random()*@length] | |
electric_brain = ["What?", "I don't understand", "Where's the tea?"] # who'd know the difference? | |
bot.addListener 'message', (from, to, message) -> | |
bot.say to, electric_brain.random() | |
process.on "SIGINT", -> | |
bot.disconnect "Goodbye cruel world!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment