forked from GitHub/dbot
akill
This commit is contained in:
parent
d0aab89435
commit
a7ccb5ff14
@ -76,6 +76,7 @@ var atheme = function(dbot) {
|
|||||||
this.commands['~chanmode'].regex = [/^chanmode (\+.)/, 2];
|
this.commands['~chanmode'].regex = [/^chanmode (\+.)/, 2];
|
||||||
|
|
||||||
this.listener = function(event) {
|
this.listener = function(event) {
|
||||||
|
if(event.action === 'NOTICE') {
|
||||||
if(event.user === 'ChanServ') {
|
if(event.user === 'ChanServ') {
|
||||||
var flags = event.params.match(/(\d+)\s+([^ ]+)\s+(\+\w+)\s+\((\#[\w\.]+)\)/),
|
var flags = event.params.match(/(\d+)\s+([^ ]+)\s+(\+\w+)\s+\((\#[\w\.]+)\)/),
|
||||||
end = event.params.match(/end of \u0002(\#[\w\.]+)\u0002 flags listing/i);
|
end = event.params.match(/end of \u0002(\#[\w\.]+)\u0002 flags listing/i);
|
||||||
@ -128,8 +129,19 @@ var atheme = function(dbot) {
|
|||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
} else { // PRIVMSG
|
||||||
|
var akill = event.message.match(/([^ ]+) AKILL:ADD: ([^ ]+) \(reason: (.+)(\) )\(duration: ([^,)]+)/);
|
||||||
|
if(event.channel === '#services' && akill) {
|
||||||
|
var channel = dbot.config.servers[server].admin_channel;
|
||||||
|
dbot.api.report.notify('ban', 'tripsit', akill[1], channel, dbot.t('akill', {
|
||||||
|
'host': akill[2],
|
||||||
|
'reason': akill[3],
|
||||||
|
'duration': akill[4]
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
this.on = 'NOTICE';
|
this.on = ['NOTICE', 'PRIVMSG'];
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.fetch = function(dbot) {
|
exports.fetch = function(dbot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user