2015-03-31 20:29:45 +02:00
|
|
|
var april = function(dbot) {
|
|
|
|
this.listener = function(event) {
|
2015-03-31 20:41:57 +02:00
|
|
|
var match = event.message.match(/^i'm (an? )?([^ ]+)$/i);
|
2015-03-31 20:29:45 +02:00
|
|
|
if(match && event.channel == '#april') {
|
2015-03-31 20:36:08 +02:00
|
|
|
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[2]);
|
2015-03-31 20:32:18 +02:00
|
|
|
setTimeout(function() {
|
2015-03-31 20:35:19 +02:00
|
|
|
event.reply('Hi ' + match[2] + ', I\'m tripbot!');
|
|
|
|
}, 1000);
|
2015-03-31 20:29:45 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
this.on = 'PRIVMSG';
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return new april(dbot);
|
|
|
|
};
|