]> jfr.im git - irc/evilnet/x3.git/commitdiff
Fixing nick burst timestamp'd account messages.
authorrubin <redacted>
Sun, 21 Nov 2004 08:51:31 +0000 (08:51 +0000)
committerrubin <redacted>
Sun, 21 Nov 2004 08:51:31 +0000 (08:51 +0000)
Author:
Log message:

src/nickserv.c

index ae117626ef35442e6fb163998995d4649588ddfd..82b012246e8a149d241939ca28f372df571aaedf 100644 (file)
@@ -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;
         }