From c0e8290bba5e4929c34128ddfa5dbb29604159e9 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 25 Apr 2015 11:03:26 +0000 Subject: [PATCH] meh --- modules/report/commands.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index ea9e324..8fca5c2 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -95,17 +95,16 @@ var commands = function(dbot) { report = 0, items = {}; aliases.push(user.primaryNick); - console.log(aliases); dbot.modules.report.db.search('notifies', { 'server': event.server }, function(notify) { _.each(aliases, function(alias) { - if(notify.message.match('banned ' + alias + ' ') || - notify.message.match(' ' + alias + ' has been unbanned') || - notify.message.match('issued a warning to ' + alias + ' ') || - notify.message.match('has quieted ' + alias + ' ') || - notify.message.match('has reported ' + alias + ' ')) { + if(notify.message.indexOf('banned ' + alias + ' ') != -1 || + notify.message.indexOf(' ' + alias + ' has been unbanned') != -1 || + notify.message.indexOf('issued a warning to ' + alias + ' ') != -1 || + notify.message.indexOf('has quieted ' + alias + ' ') != -1 || + notify.message.indexOf('has reported ' + alias + ' ') != -1) { if(notify.type == 'ban') { ban++; if(notify.time > latest_ban.time) {