mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
unquiet command
This commit is contained in:
parent
5cf5714640
commit
a9e9aaef36
@ -19,6 +19,21 @@ var commands = function(dbot) {
|
||||
event.reply(dbot.t('quieted', { 'quietee': quietee }));
|
||||
},
|
||||
|
||||
'~unquiet': function(event) {
|
||||
var server = event.server,
|
||||
quieter = event.user,
|
||||
channel = event.input[1],
|
||||
quietee = event.input[2].trim();
|
||||
|
||||
if(_.isUndefined(channel)) {
|
||||
channel = event.channel.name;
|
||||
}
|
||||
channel = channel.trim();
|
||||
|
||||
this.api.quiet(server, quietee, channel);
|
||||
event.reply(dbot.t('unquieted', { 'quietee': quietee }));
|
||||
},
|
||||
|
||||
'~ckick': function(event) {
|
||||
var server = event.server,
|
||||
kicker = event.user,
|
||||
@ -240,6 +255,7 @@ var commands = function(dbot) {
|
||||
commands['~ckick'].regex = [/^~ckick ([^ ]+) ([^ ]+) (.+)$/, 4];
|
||||
commands['~nban'].regex = /^~nban ([\d\.^ ]+)?([^ ]+) (.+)$/;
|
||||
commands['~quiet'].regex = /^~quiet (#[^ ]+ )?([^ ]+) ?$/;
|
||||
commands['~unquiet'].regex = /^~unquiet (#[^ ]+ )?([^ ]+) ?$/;
|
||||
|
||||
return commands;
|
||||
};
|
||||
|
@ -13,6 +13,10 @@ var kick = function(dbot) {
|
||||
dbot.say(server, this.config.chanserv, 'quiet ' + channel + ' ' + user);
|
||||
},
|
||||
|
||||
'unquiet': function(server, user, channel) {
|
||||
dbot.say(server, this.config.chanserv, 'unquiet ' + channel + ' ' + user);
|
||||
},
|
||||
|
||||
'kick': function(server, user, channel, msg) {
|
||||
dbot.instance.connections[server].send('KICK ' + channel + ' ' + user + ' :' + msg);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user