]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_l.cpp
Find the right variable so it actually works, too.
[user/henk/code/inspircd.git] / src / modes / cmode_l.cpp
index e87a524b2d9b18d34fda764881f5851375b89d98..f20256e875a1a9a0478974c6486379dddb995b63 100644 (file)
@@ -54,8 +54,7 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s
                parameter = ConvToStr(limit);
 
                /* Set new limit */
-               channel->SetModeParam('l', parameter.c_str(), true);
-               channel->modes[CM_LIMIT] = 1;
+               channel->SetModeParam('l', parameter);
 
                return MODEACTION_ALLOW;
        }
@@ -71,9 +70,7 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s
                }
 
                /* Removing old limit, no checks here */
-               channel->SetModeParam('l', "", false);
-               channel->modes[CM_LIMIT] = 0;
-
+               channel->SetModeParam('l', "");
                return MODEACTION_ALLOW;
        }
 }