]> jfr.im git - irc/quakenet/snircd.git/commitdiff
Should be unsigned long for A
authorpaul <redacted>
Sat, 14 Oct 2006 10:19:00 +0000 (11:19 +0100)
committerpaul <redacted>
Sat, 14 Oct 2006 10:19:00 +0000 (11:19 +0100)
include/struct.h
ircd/m_account.c
ircd/s_auth.c
ircd/s_user.c

index e5d452ab69085d27339b65e4cb8aa7bafe91e27a..56c3f712256a7c9f567a8e57045e0a9262836795 100644 (file)
@@ -84,7 +84,7 @@ struct User {
   char               realhost[HOSTLEN + 1];     /**< actual hostname */
   char               account[ACCOUNTLEN + 1];   /**< IRC account name */
   time_t            acc_create;                /**< IRC account timestamp */
-  unsigned int       acc_id;                    /**< IRC account unique id */
+  unsigned long       acc_id;                    /**< IRC account unique id */
 };
 
 #endif /* INCLUDED_struct_h */
index 07349bb742261d44eec2859cd30a1054f5c99a15..fa02c5633a8ce3be19a7a69f8b56b04f5eadd646 100644 (file)
@@ -137,8 +137,8 @@ int ms_account(struct Client* cptr, struct Client* sptr, int parc,
     Debug((DEBUG_DEBUG, "Received timestamped account: account \"%s\", "
            "timestamp %Tu", parv[2], cli_user(acptr)->acc_create));
     if (parc > 4) {
-      cli_user(acptr)->acc_id = atoi(parv[4]); 
-      Debug((DEBUG_DEBUG, "Received account id for account \"%s\": id %d", parv[2], parv[4]));
+      cli_user(acptr)->acc_id = strtoul(parv[4], NULL, 10); 
+      Debug((DEBUG_DEBUG, "Received account id for account \"%s\": id %lu", parv[2], cli_user(acptr)->acc_id));
     }
   }
 
index 87ba2c59dcf6e385eef4d9e9f2a2261edb0a4751..08864c6a79ffa53716383dd896d0689a8773294c 100644 (file)
@@ -1875,7 +1875,7 @@ static int iauth_cmd_done_account(struct IAuth *iauth, struct Client *cli,
     char *end;
     cli_user(cli)->acc_create = strtoul(params[0] + len + 1, &end, 10);
     if (*end == ':')
-      cli_user(cli)->acc_id = strtoul(end, NULL, 10);
+      cli_user(cli)->acc_id = strtoul(end + 1, NULL, 10);
   }
 
   /* Copy account name to User structure. */
index 6b82571e4e3014c8def82eec69048361fc474fb8..df932a7260b597b63854cc31db18f8cde360f073 100644 (file)
@@ -627,9 +627,9 @@ int set_nick_name(struct Client* cptr, struct Client* sptr,
        len = (p++) - account;
        cli_user(new_client)->acc_create = atoi(p);
         if ((pp = strchr(p, ':')))
-          cli_user(new_client)->acc_id = atoi(pp + 1);
+          cli_user(new_client)->acc_id = strtoul(pp + 1, NULL, 10);
        Debug((DEBUG_DEBUG, "Received timestamped account in user mode; "
-              "account \"%s\", timestamp %Tu id %u", account,
+              "account \"%s\", timestamp %Tu id %lu", account,
               cli_user(new_client)->acc_create,
                cli_user(new_client)->acc_id));
       }