3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

Update april.js

This commit is contained in:
Luke Slater 2015-04-01 00:42:46 +03:00
parent a07daddccc
commit db661c1229

View File

@ -1,10 +1,10 @@
var april = function(dbot) {
this.listener = function(event) {
var match = event.message.match(/^i'?( a)?m (an? )?([^ ]+)/i);
if(match && event.channel == '#april') {
if(match) {
dbot.say(event.server, 'operserv', 'svsnick ' + event.user + ' ' + match[3]);
setTimeout(function() {
event.reply('Hi ' + match[3] + ', I\'m tripbot!');
event.reply('Hi ' + match[3] + ', I\'m ' + dbot.config.name);
}, 1000);
}
}