mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
ffs
This commit is contained in:
commit
9ed4c582e2
@ -76,6 +76,7 @@ var atheme = function(dbot) {
|
||||
this.commands['~chanmode'].regex = [/^chanmode (\+.)/, 2];
|
||||
|
||||
this.listener = function(event) {
|
||||
if(event.action === 'NOTICE') {
|
||||
if(event.user === 'ChanServ') {
|
||||
var flags = event.params.match(/(\d+)\s+([^ ]+)\s+(\+\w+)\s+\((\#[\w\.]+)\)/),
|
||||
end = event.params.match(/end of \u0002(\#[\w\.]+)\u0002 flags listing/i);
|
||||
@ -102,9 +103,12 @@ var atheme = function(dbot) {
|
||||
});
|
||||
done();
|
||||
});
|
||||
done();
|
||||
});
|
||||
}.bind(this), function() {
|
||||
_.each(this.flagStack[event.server][end[1]].callbacks, function(callback) {
|
||||
callback(null, this.flagStack[event.server][end[1]].flags);
|
||||
}.bind(this), function() {
|
||||
console.log('DONE');
|
||||
console.log(allFlags);
|
||||
_.each(this.flagStack[event.server][end[1]].callbacks, function(callback) {
|
||||
callback(null, this.flagStack[event.server][end[1]].flags);
|
||||
}.bind(this));
|
||||
@ -129,8 +133,19 @@ console.log(allFlags);
|
||||
}
|
||||
}, 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);
|
||||
this.on = 'NOTICE';
|
||||
this.on = ['NOTICE', 'PRIVMSG'];
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"stream": "http://tripsit.fm:8000",
|
||||
"announce": [ { "server": "tripsit", "name": "#tripbot" } ],
|
||||
"stream": "http://radio.tripsit.me:8000/tripradio",
|
||||
"announce": [ { "server": "tripsit", "name": "#drugs" } ],
|
||||
"outputPrefix": "\u00033radio\u000f"
|
||||
}
|
||||
|
@ -35,11 +35,14 @@ var api = function(dbot) {
|
||||
return k;
|
||||
}
|
||||
}.bind(this));
|
||||
ops = _.without(ops, undefined);
|
||||
console.log(ops);
|
||||
this.db.read('nunsubs', cName + '.' + server, function(err, nunsubs) {
|
||||
if(nunsubs) {
|
||||
_.each(nunsubs.users, function(user) {
|
||||
var uPart = user.split('.')[0];
|
||||
if(_.include(ops, uPart)) {
|
||||
console.log('removing ' + uPart);
|
||||
ops = _.without(ops, uPart);
|
||||
}
|
||||
});
|
||||
|
@ -10,6 +10,7 @@ var report = function(dbot) {
|
||||
this.internalAPI = {
|
||||
'notify': function(server, users, message) {
|
||||
async.eachSeries(users, function(nick, next) {
|
||||
console.log('sending msg to ' + nick);
|
||||
setTimeout(function() {
|
||||
dbot.say(server, nick, message);
|
||||
next();
|
||||
|
Loading…
Reference in New Issue
Block a user