summaryrefslogtreecommitdiff
path: root/src/modes/cmode_l.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cmode_l.cpp')
-rw-r--r--src/modes/cmode_l.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp
index e87a524b2..3d37fc900 100644
--- a/src/modes/cmode_l.cpp
+++ b/src/modes/cmode_l.cpp
@@ -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->SetMode('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->SetMode('l', "");
return MODEACTION_ALLOW;
}
}