Properly handle classes with no "usermodes" option; count always-invisible users.
authorMichael Poole <mdpoole@troilus.org>
Wed, 27 Apr 2005 12:42:25 +0000 (12:42 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 27 Apr 2005 12:42:25 +0000 (12:42 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1389 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ircd/s_user.c

index 67cfe3dfda4c5bad5ae64439ee3841d213e7f8a4..fec640aab124f0343559ba82bc7a6fd264af744e 100644 (file)
@@ -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);