From ce092b688e2ad90417912db241d84c345f1b2a13 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 14 Apr 2013 15:33:55 +0000 Subject: [PATCH] update ban and quiet in kick.api to use configured chanserv [#261] --- modules/kick/config.json | 3 ++- modules/kick/kick.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/kick/config.json b/modules/kick/config.json index d765613..c32561f 100644 --- a/modules/kick/config.json +++ b/modules/kick/config.json @@ -3,5 +3,6 @@ "dependencies": [ "command", "report", "users" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/kick/README.md", "ignorable": true, - "countSilently": true + "countSilently": true, + "chanserv": "ChanServ" } diff --git a/modules/kick/kick.js b/modules/kick/kick.js index 5308615..a5210a1 100644 --- a/modules/kick/kick.js +++ b/modules/kick/kick.js @@ -4,7 +4,11 @@ var kick = function(dbot) { this.api = { 'ban': function(server, user, channel) { - dbot.instance.connections[server].send('MODE ' + channel + ' +b ' + user + '!*@*'); + dbot.say(event.server, this.config.chanserv, '!ban ' + user) + }, + + 'quiet': function(server, user, channel) { + dbot.say(event.server, this.config.chanserv, '!quiet ' + user) }, 'kick': function(server, user, channel, msg) {