dbot/modules/april/april.js

17 lines
499 B
JavaScript
Raw Normal View History

2015-03-31 20:29:45 +02:00
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]);
2015-03-31 20:32:18 +02:00
setTimeout(function() {
event.reply('Hi ' + match[1] + ', I\'m tripbot!');
}, 2000);
2015-03-31 20:29:45 +02:00
}
}
this.on = 'PRIVMSG';
};
exports.fetch = function(dbot) {
return new april(dbot);
};