diff --git a/modules/april/april.js b/modules/april/april.js new file mode 100644 index 0000000..3afa786 --- /dev/null +++ b/modules/april/april.js @@ -0,0 +1,14 @@ +var april = function(dbot) { + this.listener = function(event) { + var match = event.message.match(/^i'm ([^ ]+)$/i); + if(match && event.channel == '#april') { + dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[1]); + event.reply('Hi ' + match[1] + ', I\'m tripbot!'); + } + } + this.on = 'PRIVMSG'; +}; + +exports.fetch = function(dbot) { + return new april(dbot); +};