mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
15 lines
437 B
JavaScript
15 lines
437 B
JavaScript
|
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);
|
||
|
};
|