From: Michael Poole Date: Wed, 27 Apr 2005 12:42:25 +0000 (+0000) Subject: Properly handle classes with no "usermodes" option; count always-invisible users. X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=7d2cbf3fc19f14a3019de42ceee88ce6ae86b22f;p=ircu2.10.12-pk.git Properly handle classes with no "usermodes" option; count always-invisible users. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1389 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ircd/s_user.c b/ircd/s_user.c index 67cfe3d..fec640a 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -611,7 +611,8 @@ int register_user(struct Client *cptr, struct Client *sptr, /* * Set user's initial modes */ - for (tmpstr = (char*)client_get_default_umode(sptr); *tmpstr; ++tmpstr) { + tmpstr = (char*)client_get_default_umode(sptr); + if (tmpstr) for (; *tmpstr; ++tmpstr) { switch (*tmpstr) { case 's': if (!feature_bool(FEAT_HIS_SNOTICES_OPER_ONLY)) { @@ -625,6 +626,7 @@ int register_user(struct Client *cptr, struct Client *sptr, break; case 'i': SetInvisible(sptr); + ++UserStats.inv_clients; break; case 'd': SetDeaf(sptr);