2015-03-31 18:29:45 +00:00
|
|
|
var april = function(dbot) {
|
|
|
|
this.listener = function(event) {
|
2015-03-31 18:50:44 +00:00
|
|
|
var match = event.message.match(/^i'?( a)?m (an? )?([^ ]+)/i);
|
2015-04-01 00:42:46 +03:00
|
|
|
if(match) {
|
2015-03-31 18:51:53 +00:00
|
|
|
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[3]);
|
2015-03-31 18:32:18 +00:00
|
|
|
setTimeout(function() {
|
2015-04-01 00:43:06 +03:00
|
|
|
event.reply('Hi ' + match[3] + ', I\'m ' + dbot.config.name + '!');
|
2015-03-31 18:35:19 +00:00
|
|
|
}, 1000);
|
2015-03-31 18:29:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
this.on = 'PRIVMSG';
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return new april(dbot);
|
|
|
|
};
|