forked from GitHub/dbot
provisional api functionality for kicking and banning [#261]
This commit is contained in:
parent
c813f6087c
commit
8fcd19cca9
@ -50,6 +50,16 @@ var kick = function(dbot) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.commands = commands;
|
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) {
|
this.listener = function(event) {
|
||||||
if(event.kickee == dbot.config.name) {
|
if(event.kickee == dbot.config.name) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user