mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +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) {
|
var nickserv = function(dbot) {
|
||||||
this.authStack = {};
|
this.authStack = {};
|
||||||
this.userStack = {};
|
this.userStack = {};
|
||||||
@ -36,8 +38,10 @@ var nickserv = function(dbot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(event.action == '302') {
|
} else if(event.action == '302') {
|
||||||
console.log('caught');
|
var match = event.params.match(/:(.*)=([^@]+)@(.+)$/);
|
||||||
console.log(event.params);
|
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);
|
}.bind(this);
|
||||||
this.on = ['NOTICE', '302'];
|
this.on = ['NOTICE', '302'];
|
||||||
|
Loading…
Reference in New Issue
Block a user