3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

working userhost api function [Close #498]

This commit is contained in:
reality 2013-06-09 16:55:46 +00:00
parent 995a5125bc
commit 47e9672b32

View File

@ -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'];