]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_s.cpp
Update all wiki links to point to the new wiki. This was done automatically with...
[user/henk/code/inspircd.git] / src / modes / cmode_s.cpp
index eec99b91d644ad6178b081ac626535a5db5c4377..b7bd2543021742921725b4cbe7d16a913f006045 100644 (file)
@@ -1,22 +1,23 @@
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
+ *
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+
 #include "inspircd.h"
 #include "mode.h"
 #include "channels.h"
 #include "users.h"
 #include "modes/cmode_s.h"
 
-ModeChannelSecret::ModeChannelSecret() : ModeHandler('s', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, 's')
 {
 }
 
-ModeAction ModeChannelSecret::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
-{
-       if (channel->modes[CM_SECRET] != adding)
-       {
-               channel->modes[CM_SECRET] = adding;
-               return MODEACTION_ALLOW;
-       }
-       else
-       {
-               return MODEACTION_DENY;
-       }
-}