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 */
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));
}
}
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. */
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));
}