forked from GitHub/dbot
shorter timeout and parse out a
This commit is contained in:
parent
417cc7b5f8
commit
b7b57da78a
@ -1,11 +1,11 @@
|
|||||||
var april = function(dbot) {
|
var april = function(dbot) {
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
var match = event.message.match(/^i'm ([^ ]+)$/i);
|
var match = event.message.match(/^i'm (a )?([^ ]+)$/i);
|
||||||
if(match && event.channel == '#april') {
|
if(match && event.channel == '#april') {
|
||||||
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[1]);
|
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[1]);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
event.reply('Hi ' + match[1] + ', I\'m tripbot!');
|
event.reply('Hi ' + match[2] + ', I\'m tripbot!');
|
||||||
}, 2000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.on = 'PRIVMSG';
|
this.on = 'PRIVMSG';
|
||||||
|
Loading…
Reference in New Issue
Block a user