]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_joinflood.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / modules / m_joinflood.cpp
index 40f7f1ba9865a7b246d8f20a9f122b824db12d37..63bcc38a4180c30526814f66ee6396d433b94ae8 100644 (file)
@@ -153,17 +153,10 @@ class JoinFlood : public ModeHandler
                                                else
                                                {
                                                        // new mode param, replace old with new
-                                                       if ((nsecs > 0) && (njoins > 0))
-                                                       {
-                                                               f = new joinfloodsettings(nsecs, njoins);
-                                                               ext.set(channel, f);
-                                                               channel->SetModeParam('j', parameter);
-                                                               return MODEACTION_ALLOW;
-                                                       }
-                                                       else
-                                                       {
-                                                               return MODEACTION_DENY;
-                                                       }
+                                                       f = new joinfloodsettings(nsecs, njoins);
+                                                       ext.set(channel, f);
+                                                       channel->SetModeParam('j', parameter);
+                                                       return MODEACTION_ALLOW;
                                                }
                                        }
                                }
@@ -176,8 +169,7 @@ class JoinFlood : public ModeHandler
                }
                else
                {
-                       joinfloodsettings* f = ext.get(channel);
-                       if (f)
+                       if (channel->IsModeSet('j'))
                        {
                                ext.unset(channel);
                                channel->SetModeParam('j', "");