This commit is contained in:
reality 2014-10-03 20:42:41 +00:00
parent d0aab89435
commit a7ccb5ff14

View File

@ -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) {