]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_halfop.cpp
Fix unsafe iteration in m_timedbans
[user/henk/code/inspircd.git] / src / modules / m_halfop.cpp
index e251802e07f884e697d8a8dae4119fb3e8e7cd04..ef8cf8bf9887ad8454846308b77d24d288abb754 100644 (file)
@@ -21,6 +21,13 @@ class ModeChannelHalfOp : public ModeHandler
        unsigned int GetPrefixRank();
        void RemoveMode(Channel* channel, irc::modestacker* stack = NULL);
        void RemoveMode(User* user, irc::modestacker* stack = NULL);
+
+       ModResult AccessCheck(User* src, Channel*, std::string& value, bool adding)
+       {
+               if (!adding && src->nick == value)
+                       return MOD_RES_ALLOW;
+               return MOD_RES_PASSTHRU;
+       }
 };
 
 ModeChannelHalfOp::ModeChannelHalfOp(Module* parent) : ModeHandler(parent, "halfop", 'h', PARAM_ALWAYS, MODETYPE_CHANNEL)
@@ -84,7 +91,7 @@ class ModuleHalfop : public Module
 
        Version GetVersion()
        {
-               return Version("Channel half-operator mode provider", VF_VENDOR|VF_COMMON);
+               return Version("Channel half-operator mode provider", VF_VENDOR);
        }
 };