diff options
| author | 2013-06-13 19:00:01 +0200 | |
|---|---|---|
| committer | 2013-06-13 19:00:01 +0200 | |
| commit | 95593de52c9b89dd3dae8d79a2c76efc81d9d353 (patch) | |
| tree | c99c8b3172b299a7d520faf7b5e69d0e3196aa05 /src/mode.cpp | |
| parent | Remove TR_END, remove TRANSLATEx() from commands that do not need it (diff) | |
| download | inspircd++-95593de52c9b89dd3dae8d79a2c76efc81d9d353.tar.gz inspircd++-95593de52c9b89dd3dae8d79a2c76efc81d9d353.tar.bz2 inspircd++-95593de52c9b89dd3dae8d79a2c76efc81d9d353.zip | |
Call Channel::SetModeParam() from the mode parser when needed instead of requiring mode handlers to do it
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 9c38afaad..1e1c7a25c 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -134,10 +134,6 @@ ModeAction ParamChannelModeHandler::OnModeChange(User* source, User* dest, Chann std::string now = channel->GetModeParameter(this); if (parameter == now) return MODEACTION_DENY; - if (adding) - channel->SetModeParam(this, parameter); - else - channel->SetModeParam(this, ""); return MODEACTION_ALLOW; } @@ -320,6 +316,9 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool if (ma != MODEACTION_ALLOW) return ma; + if ((!mh->IsListMode()) && (mh->GetNumParams(true)) && (chan)) + chan->SetModeParam(mh, (adding ? parameter : "")); + itpair = modewatchermap.equal_range(mh->name); for (ModeWatchIter i = itpair.first; i != itpair.second; ++i) { |
