diff options
| author | 2006-07-07 15:04:36 +0000 | |
|---|---|---|
| committer | 2006-07-07 15:04:36 +0000 | |
| commit | ace37813034e91b0972ba84962814571644f2eee (patch) | |
| tree | 3c0a86268788cdfb11f87041fe74f0b888e033ea /src/modes/cmode_s.cpp | |
| parent | Dummy framework to insert the class for channelmode +s (diff) | |
Mode parser WORKS! (for simple non-parameterized channel modes)
Tested with channel mode +s.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4126 e03df62e-2008-0410-955e-edbf42e46eb7
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; + } } |
