]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_namedmodes.cpp
Move OnSync{Channel,Network,User} to ServerEventListener.
[user/henk/code/inspircd.git] / src / modules / m_namedmodes.cpp
index d4263d899d46a741ee20482736043b904f18577c..cd63f42985de9de1b1aa3ff75a22872d6c886473 100644 (file)
@@ -31,7 +31,7 @@ static void DisplayList(LocalUser* user, Channel* channel)
                if (!channel->IsModeSet(mh))
                        continue;
                numeric.Add("+" + mh->name);
-               if (mh->GetNumParams(true))
+               if (mh->NeedsParam(true))
                {
                        if ((mh->name == "key") && (!channel->HasUser(user)) && (!user->HasPrivPermission("channels/auspex")))
                                numeric.Add("<key>");
@@ -52,7 +52,7 @@ class CommandProp : public SplitCommand
                syntax = "<user|channel> {[+-]<mode> [<value>]}*";
        }
 
-       CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* src)
+       CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* src) CXX11_OVERRIDE
        {
                Channel* const chan = ServerInstance->FindChan(parameters[0]);
                if (!chan)
@@ -80,7 +80,7 @@ class CommandProp : public SplitCommand
                        ModeHandler* mh = ServerInstance->Modes->FindMode(prop, MODETYPE_CHANNEL);
                        if (mh)
                        {
-                               if (mh->GetNumParams(plus))
+                               if (mh->NeedsParam(plus))
                                {
                                        if (i != parameters.size())
                                                modes.push(mh, plus, parameters[i++]);
@@ -103,7 +103,7 @@ class DummyZ : public ModeHandler
        }
 
        // Handle /MODE #chan Z
-       void DisplayList(User* user, Channel* chan)
+       void DisplayList(User* user, Channel* chan) CXX11_OVERRIDE
        {
                if (IS_LOCAL(user))
                        ::DisplayList(static_cast<LocalUser*>(user), chan);
@@ -124,7 +124,7 @@ class ModuleNamedModes : public Module
                return Version("Provides the ability to manipulate modes via long names.",VF_VENDOR);
        }
 
-       void Prioritize()
+       void Prioritize() CXX11_OVERRIDE
        {
                ServerInstance->Modules->SetPriority(this, I_OnPreMode, PRIORITY_FIRST);
        }
@@ -161,7 +161,7 @@ class ModuleNamedModes : public Module
                                }
 
                                curr.param.clear();
-                               if (mh->GetNumParams(curr.adding))
+                               if (mh->NeedsParam(curr.adding))
                                {
                                        if (value.empty())
                                        {