From 8fcd19cca959268f25d4100fbc7848958c188a40 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 5 Feb 2013 19:22:22 +0000 Subject: [PATCH] provisional api functionality for kicking and banning [#261] --- modules/kick/kick.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/kick/kick.js b/modules/kick/kick.js index b70bb61..5c78944 100644 --- a/modules/kick/kick.js +++ b/modules/kick/kick.js @@ -50,6 +50,16 @@ var kick = function(dbot) { } }; this.commands = commands; + + this.api = { + 'ban': function(server, user, channel) { + dbot.instance.connections[server].send('MODE ' + channel + ' +b ' + user + '!*@*'); + }, + + 'kick': function(server, user, channel, msg) { + dbot.instance.connections[server].send('KICK ' + channel + ' ' + event.user + ' :' + msg); + } + }; this.listener = function(event) { if(event.kickee == dbot.config.name) {