diff options
Diffstat (limited to 'src/modes/cmode_s.cpp')
-rw-r--r-- | src/modes/cmode_s.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp index 6a27dddfd..f6ae9a2f4 100644 --- a/src/modes/cmode_s.cpp +++ b/src/modes/cmode_s.cpp @@ -10,6 +10,13 @@ ModeChannelSecret::ModeChannelSecret() : ModeHandler('s', 0, 0, 0, MODETYPE_CHAN ModeAction ModeChannelSecret::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { - channel->modes[CM_SECRET] = adding; - return MODEACTION_ALLOW; + if (channel->modes[CM_SECRET] != adding) + { + channel->modes[CM_SECRET] = adding; + return MODEACTION_ALLOW; + } + else + { + return MODEACTION_DENY; + } } |