]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_s.cpp
Remove needless sockaddr[2] allocations, replace with irc::sockets::sockaddrs union
[user/henk/code/inspircd.git] / src / modes / cmode_s.cpp
index 47e66d13978df4ba5db43c97621c9ae0d59d3d11..b7bd2543021742921725b4cbe7d16a913f006045 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  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 "users.h"
 #include "modes/cmode_s.h"
 
-ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, 's')
 {
 }
 
-ModeAction ModeChannelSecret::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
-{
-       if (channel->modes[CM_SECRET] != adding)
-       {
-               channel->modes[CM_SECRET] = adding;
-               return MODEACTION_ALLOW;
-       }
-       else
-       {
-               return MODEACTION_DENY;
-       }
-}