return 0;
#endif
- /* Try getting it from np->auth */
+ /* Use the userid from authext only. */
if (np->auth)
return np->auth->userid;
- /* Else use the chanserv nickext */
- if ((rup=getreguserfromnick(np)))
- return rup->ID;
-
Error("authtracker",ERR_WARNING,"Unable to get userID from IsAccount() user %s",np->nick);
return 0;
}
registerhook(HOOK_NICK_QUIT, at_handlequitorkill);
registerhook(HOOK_NICK_KILL, at_handlequitorkill);
registerhook(HOOK_NICK_LOSTNICK, at_handlelostnick);
- registerhook(HOOK_CHANSERV_SETUSERID, at_newnick);
+ registerhook(HOOK_NICK_NEWNICK, at_newnick);
+ registerhook(HOOK_NICK_ACCOUNT, at_newnick);
registerhook(HOOK_SERVER_LINKED, at_serverlinked);
}
deregisterhook(HOOK_NICK_QUIT, at_handlequitorkill);
deregisterhook(HOOK_NICK_KILL, at_handlequitorkill);
deregisterhook(HOOK_NICK_LOSTNICK, at_handlelostnick);
- deregisterhook(HOOK_CHANSERV_SETUSERID, at_newnick);
+ deregisterhook(HOOK_NICK_NEWNICK, at_newnick);
+ deregisterhook(HOOK_NICK_ACCOUNT, at_newnick);
deregisterhook(HOOK_SERVER_LINKED, at_serverlinked);
}
assert(getactiveuserfromnick(np));
if (IsAccount(np) && np->auth) {
- if ((rup=findreguserbynick(np->authname))!=NULL) {
- triggerhook(HOOK_CHANSERV_SETUSERID, np);
+ if (np->auth->exts[chanservaext]) {
cs_doallautomodes(np);
} else {
/* Auto create user.. */
#define HOOK_CHANNEL_LOSTNICK 416 /* Argument is void*[2] (channel, nick) */
#define HOOK_CHANSERV_DBLOADED 500 /* No arg */
-#define HOOK_CHANSERV_SETUSERID 501 /* Argument is nick * */
+/* 501 spare for now */
#define HOOK_CHANSERV_RUNNING 502 /* No arg */
+
#define HOOK_CONTROL_REGISTERED 600 /* Argument is nick* */
#define HOOK_CONTROL_WHOISREQUEST 601 /* Argument is nick* */
#define HOOK_CONTROL_WHOISREPLY 602 /* Argument is char* */