summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar danieldg2010-01-11 20:10:43 +0000
committerGravatar danieldg2010-01-11 20:10:43 +0000
commita1fc957dd8f914139d8fb5d37c325f7baf1da061 (patch)
treea45fdd113df3e40f0d9b36dd48627bfd7a33a82a
parentHook OnUserRegister instead of OnUserConnect so that remote user connection i... (diff)
Fix +l being visibly set on every FJOIN of a remote user
git-svn-id: http://svn.inspircd.org/repository/branches/1_2_stable@12249 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modes/cmode_l.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp
index f20256e87..87763c16a 100644
--- a/src/modes/cmode_l.cpp
+++ b/src/modes/cmode_l.cpp
@@ -53,6 +53,11 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s
parameter = ConvToStr(limit);
+ std::string now = channel->GetModeParameter('l');
+
+ if (now == parameter)
+ return MODEACTION_DENY;
+
/* Set new limit */
channel->SetModeParam('l', parameter);
@@ -64,10 +69,7 @@ ModeAction ModeChannelLimit::OnModeChange(User*, User*, Channel* channel, std::s
* If there isnt, dont allow the -l
*/
if (channel->GetModeParameter('l').empty())
- {
- parameter = "";
return MODEACTION_DENY;
- }
/* Removing old limit, no checks here */
channel->SetModeParam('l', "");