]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noinvite.cpp
Check for windows drive letters on the start of paths and treat them the same as...
[user/henk/code/inspircd.git] / src / modules / m_noinvite.cpp
index efa0af0e10957763c236d0b21b79a8597f568935..e27ed6f04f2f57b58d9b7747e5032ca5a7550ded 100644 (file)
 
 /* $ModDesc: Provides support for unreal-style channel mode +V */
 
-class NoInvite : public ModeHandler
+class NoInvite : public SimpleChannelModeHandler
 {
  public:
-       NoInvite(InspIRCd* Instance) : ModeHandler(Instance, 'V', 0, 0, false, MODETYPE_CHANNEL, false) { }
-
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
-       {
-               if (adding)
-               {
-                       if (!channel->IsModeSet('V'))
-                       {
-                               channel->SetMode('V',true);
-                               return MODEACTION_ALLOW;
-                       }
-               }
-               else
-               {
-                       if (channel->IsModeSet('V'))
-                       {
-                               channel->SetMode('V',false);
-                               return MODEACTION_ALLOW;
-                       }
-               }
-
-               return MODEACTION_DENY;
-       }
+       NoInvite(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, 'V') { }
 };
 
 class ModuleNoInvite : public Module