From: rubin Date: Sun, 21 Nov 2004 08:51:31 +0000 (+0000) Subject: Fixing nick burst timestamp'd account messages. X-Git-Tag: 1.9~704 X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/commitdiff_plain/a9b5e3de4b458f788d04a651c2d1fb95c34ac15a?hp=26696ffc9ad18ee1f68c1a19d529276c5851e775 Fixing nick burst timestamp'd account messages. Author: Log message: --- diff --git a/src/nickserv.c b/src/nickserv.c index ae11762..82b0122 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -3700,28 +3700,27 @@ handle_account(struct userNode *user, const char *stamp) { struct handle_info *hi; char *colon; - time_t timestamp; - #ifdef WITH_PROTOCOL_P10 + time_t timestamp = 0; + + colon = strchr(stamp, ':'); + if(colon && colon[1]) + { + *colon = 0; + timestamp = atoi(colon+1); + } hi = dict_find(nickserv_handle_dict, stamp, NULL); + if(hi && hi->registered != timestamp) + { + log_module(MAIN_LOG, LOG_WARNING, "%s using account %s but timestamp does not match %lu is not %lu.", user->nick, stamp, timestamp, hi->registered); + return; + } #else hi = dict_find(nickserv_id_dict, stamp, NULL); #endif if (hi) { - colon = strchr(stamp, ':'); - if(colon && colon[1]) - { - *colon = 0; - timestamp = atoi(colon+1); - if(hi->registered != timestamp) - { - log_module(MAIN_LOG, LOG_WARNING, "%s using account %s but timestamp does not match %lu is not %lu.", user->nick, stamp, timestamp, hi->registered); - return; - } - } - if (HANDLE_FLAGGED(hi, SUSPENDED)) { return; }