]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_i.cpp
ModResult conversion: Change return type of all module functions
[user/henk/code/inspircd.git] / src / modes / cmode_i.cpp
index dae03445811d4909fc9dbc798f5cfc0103acb1a5..60183b001186065122fa5ffd9024371ab8342137 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 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_i.h"
 
-ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : ModeHandler(Instance, 'i', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, NULL, 'i')
 {
 }
 
-ModeAction ModeChannelInviteOnly::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
-{
-       if (channel->modes[CM_INVITEONLY] != adding)
-       {
-               channel->modes[CM_INVITEONLY] = adding;
-               return MODEACTION_ALLOW;
-       }
-       else
-       {
-               return MODEACTION_DENY;
-       }
-}