3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

remove getchannel stuff

This commit is contained in:
reality 2014-09-04 15:25:21 +00:00
parent ef250fbc05
commit 8dfe1a37c4
3 changed files with 2 additions and 20 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}
});
}
};