diff --git a/modules/report/api.js b/modules/report/api.js index 93b1515..6967c96 100644 --- a/modules/report/api.js +++ b/modules/report/api.js @@ -33,7 +33,6 @@ var api = function(dbot) { }, this); ops = _.pluck(ops, 'name'); -/** TODO dbot.api.users.resolveChannel(server, cName, function(channel) { if(channel) { var perOps = channel.op; @@ -72,7 +71,6 @@ var api = function(dbot) { }.bind(this)); } }.bind(this)); -**/ }, 'notifyUsers': function(server, users, message) { diff --git a/modules/report/commands.js b/modules/report/commands.js index 7b33b50..c6b358e 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -75,9 +75,10 @@ var commands = function(dbot) { }, '~report': function(event) { - var channelName = (event.input[1].trim() || event.channel), + var channelName = (event.input[1] || event.channel.toString()), nick = event.input[2], reason = event.input[3].trim(); + channelName = channelName.trim(); if(channelName == event.user) { channelName = dbot.config.servers[event.server].admin_channel; diff --git a/modules/users/api.js b/modules/users/api.js index af6a644..6c7fdfa 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -43,23 +43,6 @@ var api = function(dbot) { callback(true, null); } }); - }, - - // Retrieve a channel record given a server and a channel name - 'resolveChannel': function(server, channel, callback) { - var id = channel + '.' + server; - this.api.getChannel(id, callback); - }, - - // Retrieve a channel record given its ID - 'getChannel': function(id, callback) { - this.db.read('channels', id, function(err, result) { - if(!err) { - callback(null, result); - } else { - callback(true, null); - } - }); } };