mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
working userhost api function [Close #498]
This commit is contained in:
parent
995a5125bc
commit
47e9672b32
@ -1,3 +1,5 @@
|
||||
var _ = require('underscore')._;
|
||||
|
||||
var nickserv = function(dbot) {
|
||||
this.authStack = {};
|
||||
this.userStack = {};
|
||||
@ -36,8 +38,10 @@ var nickserv = function(dbot) {
|
||||
}
|
||||
}
|
||||
} else if(event.action == '302') {
|
||||
console.log('caught');
|
||||
console.log(event.params);
|
||||
var match = event.params.match(/:(.*)=([^@]+)@(.+)$/);
|
||||
if(match && _.has(this.userStack, event.server) && _.has(this.userStack[event.server], match[1])) {
|
||||
this.userStack[event.server][match[1]](match[3].trim());
|
||||
}
|
||||
}
|
||||
}.bind(this);
|
||||
this.on = ['NOTICE', '302'];
|
||||
|
Loading…
Reference in New Issue
Block a user