From 7d2cbf3fc19f14a3019de42ceee88ce6ae86b22f Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Wed, 27 Apr 2005 12:42:25 +0000 Subject: [PATCH] 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 --- ircd/s_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.20.1