diff --git a/modules/kill_namespam/kill_namespam.js b/modules/kill_namespam/kill_namespam.js index 2a65bef..6f952a2 100644 --- a/modules/kill_namespam/kill_namespam.js +++ b/modules/kill_namespam/kill_namespam.js @@ -19,7 +19,8 @@ var kill_namespam = function(dbot) { // Here we listen for atropos if(event.channel == this.config.cliconn_channel) { if(event.message.match('▶')) { - var matchedPattern = _.find(this.config.cliconn_patterns, function(p) { return event.message.match(p); }) + var matchedPattern = _.find(this.config.cliconn_patterns, + function(p) { try { return event.message.match(p); } catch(e) {}; }); // ok.jpg if(matchedPattern) { var nick = event.message.split(' ')[2]; dbot.api.nickserv.getUserHost(event.server, nick, function(host) { diff --git a/run.js b/run.js index dc8e5cf..29e1a03 100644 --- a/run.js +++ b/run.js @@ -332,7 +332,7 @@ DBot.prototype.reloadModules = function() { }.bind(this)); - this.save(); + this.save(function() {}); }; new DBot();