mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 03:33:07 +01:00
Fix puns by faking an event and calling it straight in jsbot
This commit is contained in:
parent
979399de46
commit
d6b56db06e
@ -4,15 +4,16 @@ var puns = function(dbot) {
|
||||
|
||||
return {
|
||||
'listener': function(event) {
|
||||
event.user = dbot.cleanNick(data.user);
|
||||
event.user = dbot.cleanNick(event.user);
|
||||
|
||||
if((dbot.db.ignores.hasOwnProperty(event.user) &&
|
||||
dbot.db.ignores[event.user].include(name)) == false) {
|
||||
if(dbot.moduleNames.include('quotes') &&
|
||||
dbot.db.quoteArrs.hasOwnProperty(data.user)) {
|
||||
data.message = '~q ' + data.user.toLowerCase();
|
||||
var params = data.message.split(' ');
|
||||
dbot.commands[params[0]](data, params);
|
||||
dbot.db.quoteArrs.hasOwnProperty(event.user)) {
|
||||
event.message = '~q ' + event.user;
|
||||
event.action = 'PRIVMSG';
|
||||
event.params = event.message.split(' ');
|
||||
dbot.instance.emit(event)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
2
run.js
2
run.js
@ -53,7 +53,7 @@ var DBot = function(timers) {
|
||||
// Populate bot properties with config data
|
||||
this.name = this.config.name || 'dbox';
|
||||
this.admin = this.config.admin || [ 'reality' ];
|
||||
this.moduleNames = this.config.modules || [ 'command', 'js', 'quotes', 'admin' ];
|
||||
this.moduleNames = this.config.modules || [ 'admin', 'command', 'dice', 'js', 'kick', 'puns', 'quotes', 'spelling', 'youare' ];
|
||||
this.language = this.config.language || 'english';
|
||||
|
||||
// It's the user's responsibility to fill this data structure up properly in
|
||||
|
Loading…
Reference in New Issue
Block a user