3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

Puns also changed to dispatch a '~q'

This commit is contained in:
Psychedelic Squid 2012-03-14 14:20:59 +00:00
parent a4313ee665
commit a08e904ea6

View File

@ -3,10 +3,14 @@ var puns = function(dbot) {
return {
'listener': function(data) {
if(dbot.moduleNames.include('quotes')) {
if(data.user == 'reality') {
dbot.instance.say(data.channel, dbot.interpolatedQuote('realityonce'));
data.message = '~q realityonce';
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
dbot.say(data.channel, data.user + ': ' + dbot.interpolatedQuote(data.user.toLowerCase()));
data.message = '~q ' + data.user.toLowerCase();
}
var params = data.message.split(' ');
dbot.commands[params[0]](data, params);
}
},