diff --git a/modules/command/api.js b/modules/command/api.js index 4cf92a9..adaedac 100644 --- a/modules/command/api.js +++ b/modules/command/api.js @@ -53,16 +53,6 @@ var api = function(dbot) { applies = true; } return applies; - }, - - 'addHook': function(command, callback) { - console.log('adding hook'); - if(_.has(dbot.commands, command)) { - if(!_.has(dbot.commands[command], 'hooks')) { - dbot.commands[command].hooks = []; - } - dbot.commands[command].hooks.push(callback); - } } }; }; diff --git a/modules/command/command.js b/modules/command/command.js index a950199..1066018 100644 --- a/modules/command/command.js +++ b/modules/command/command.js @@ -32,11 +32,6 @@ var command = function(dbot) { try { var command = dbot.commands[commandName]; var results = command.apply(dbot.modules[command.module], [event]); - if(_.has(command, 'hooks') && results !== false) { - _.each(command['hooks'], function(hook) { - hook.apply(hook.module, _.values(results)); - }, this); - } } catch(err) { if(dbot.config.debugMode == true) { var stack = err.stack.split('\n').slice(1, dbot.config.debugLevel + 1); diff --git a/modules/poll/poll.js b/modules/poll/poll.js index 1110faa..d54e8f1 100644 --- a/modules/poll/poll.js +++ b/modules/poll/poll.js @@ -15,8 +15,8 @@ var poll = function(dbot) { }; this.onLoad = function() { - dbot.api.command.addHook('~setaliasparent', this.internalAPI.updatePollNicks); - dbot.api.command.addHook('~mergeusers', this.internalAPI.updatePollNicks); + // dbot.api.command.addHook('~setaliasparent', this.internalAPI.updatePollNicks); + // dbot.api.command.addHook('~mergeusers', this.internalAPI.updatePollNicks); }.bind(this); };