]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_kicknorejoin.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / m_kicknorejoin.cpp
index e134ee3176c79ad17aa7c13cee6823c96745e631..18fd995ad201ad6870eedbf0eec5315c74f49861 100644 (file)
@@ -50,7 +50,8 @@ public:
                                        c->Shrink("norejoinusers");
                                }
                        }
-                       return 1;
+                       /* Don't allow negative or 0 +J value */
+                       return ((!mode_on) || (atoi(params[0].c_str()) > 0));
                }
                return 0;
        }
@@ -102,9 +103,9 @@ public:
                return 0;
        }
        
-       virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
+       virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
        {
-               if (chan->IsCustomModeSet('J') && (source != user))
+               if (chan->IsModeSet('J') && (source != user))
                {
                        delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");