From ace37813034e91b0972ba84962814571644f2eee Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 7 Jul 2006 15:04:36 +0000 Subject: 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 --- src/modes/cmode_s.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modes') 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; + } } -- cgit v1.2.3