aboutsummaryrefslogtreecommitdiffstats
path: root/src/modes/cmode_k.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-04-11 23:47:45 +0200
committerGravatar attilamolnar2013-07-01 19:21:08 +0200
commitf2cdf27dd9c45f91f4184b81ea3b9be7c5d88173 (patch)
tree2af494a7cf74fc8731e6cae695ae37a2267b6d5e /src/modes/cmode_k.cpp
parentFix a few oversights (diff)
Replace hardcoded mode letters passed to IsModeSet() and GetModeParameter() with ModeHandlers, part 1
Diffstat (limited to 'src/modes/cmode_k.cpp')
-rw-r--r--src/modes/cmode_k.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index f07d47172..e56b26ff1 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -32,18 +32,18 @@ ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, "key", 'k', PARAM_ALWAYS, M
ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
- bool exists = channel->IsModeSet('k');
+ bool exists = channel->IsModeSet(this);
if (IS_LOCAL(source))
{
if (exists == adding)
return MODEACTION_DENY;
- if (exists && (parameter != channel->GetModeParameter('k')))
+ if (exists && (parameter != channel->GetModeParameter(this)))
{
/* Key is currently set and the correct key wasnt given */
return MODEACTION_DENY;
}
} else {
- if (exists && adding && parameter == channel->GetModeParameter('k'))
+ if (exists && adding && parameter == channel->GetModeParameter(this))
{
/* no-op, don't show */
return MODEACTION_DENY;