]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_t.cpp
Fix MySQL crash on module unload with empty query queue
[user/henk/code/inspircd.git] / src / modes / cmode_t.cpp
index 6424e1f6ca92879f31b77846dfcd4b047ccda9e1..8ac0ca7aebf66e8833163d706f4a8acd8f706a8a 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
 #include "users.h"
 #include "modes/cmode_t.h"
 
-ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Instance, NULL, 't', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelTopicOps::ModeChannelTopicOps() : SimpleChannelModeHandler(NULL, "topiclock", 't')
 {
 }
-
-ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding)
-{
-       if (channel->modes[CM_TOPICLOCK] != adding)
-       {
-               channel->modes[CM_TOPICLOCK] = adding;
-               return MODEACTION_ALLOW;
-       }
-       else
-       {
-               return MODEACTION_DENY;
-       }
-}
-