+2009-07-30 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/s_user.c (register_user): Move the default-usermodes call
+ to set_user_mode() to before SetUser(), so that the former does
+ not increment the UserStats fields. Add back the explicit
+ adjustments to UserStats for invisible and opered clients.
+
2009-07-05 Michael Poole <mdpoole@troilus.org>
* ircd/s_user.c (register_user): Use correct parc for
Count_unknownbecomesclient(sptr, UserStats);
+ /*
+ * Set user's initial modes
+ */
+ tmpstr = (char*)client_get_default_umode(sptr);
+ if (tmpstr) {
+ char *umodev[] = { NULL, NULL, NULL, NULL };
+ umodev[2] = tmpstr;
+ set_user_mode(cptr, sptr, 3, umodev, ALLOWMODES_ANY);
+ }
+
SetUser(sptr);
cli_handler(sptr) = CLIENT_HANDLER;
SetLocalNumNick(sptr);
cli_info(sptr), NumNick(cptr) /* two %s's */);
IPcheck_connect_succeeded(sptr);
- /*
- * Set user's initial modes
- */
- tmpstr = (char*)client_get_default_umode(sptr);
- if (tmpstr) {
- char *umodev[] = { NULL, NULL, NULL, NULL };
- umodev[2] = tmpstr;
- set_user_mode(cptr, sptr, 3, umodev, ALLOWMODES_ANY);
- }
}
else {
struct Client *acptr = user->server;
*/
if (HasHiddenHost(sptr))
hide_hostmask(sptr, FLAG_HIDDENHOST);
+ if (IsInvisible(sptr))
+ ++UserStats.inv_clients;
+ if (IsOper(sptr))
+ ++UserStats.opers;
tmpstr = umode_str(sptr);
/* Send full IP address to IPv6-grokking servers. */