diff options
| author | 2010-08-05 22:03:48 -0400 | |
|---|---|---|
| committer | 2010-08-05 22:03:48 -0400 | |
| commit | 38ba1423e45adbf65067cc5a160a0c9f69e48bf7 (patch) | |
| tree | f6fdc398ba1bebf8f7cc96255a99d97e9849a689 /src/mode.cpp | |
| parent | Save umodes in addition to channel modes (diff) | |
Fix DelMode failing on modes using the default ParamChannelModeHandler::OnModeChange
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 979413730..448c4e358 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -170,13 +170,15 @@ ModeAction SimpleChannelModeHandler::OnModeChange(User* source, User* dest, Chan ModeAction ParamChannelModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { - if (adding && !ParamValidate(parameter)) - return MODEACTION_DENY; - std::string now = channel->GetModeParameter(this); - if (parameter == now) - return MODEACTION_DENY; if (adding) + { + std::string now = channel->GetModeParameter(this); + if (parameter == now) + return MODEACTION_DENY; + if (!ParamValidate(parameter)) + return MODEACTION_DENY; channel->SetModeParam(this, parameter); + } else channel->SetModeParam(this, ""); return MODEACTION_ALLOW; |
