3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00
dbot/modules/april/april.js
2015-03-31 18:36:08 +00:00

17 lines
504 B
JavaScript

var april = function(dbot) {
this.listener = function(event) {
var match = event.message.match(/^i'm (a )?([^ ]+)$/i);
if(match && event.channel == '#april') {
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[2]);
setTimeout(function() {
event.reply('Hi ' + match[2] + ', I\'m tripbot!');
}, 1000);
}
}
this.on = 'PRIVMSG';
};
exports.fetch = function(dbot) {
return new april(dbot);
};