]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_uhnames.cpp
Remove the size argument from IsChannel and IsNick.
[user/henk/code/inspircd.git] / src / modules / m_uhnames.cpp
index 5693eb8070b8006a9907f55bfbf4af0cf256e808..3e504b8e52a353f25c32c8b21dd3a3c33d3a1e99 100644 (file)
@@ -20,7 +20,7 @@
 
 
 #include "inspircd.h"
-#include "m_cap.h"
+#include "modules/cap.h"
 
 /* $ModDesc: Provides the UHNAMES facility. */
 
@@ -31,25 +31,25 @@ class ModuleUHNames : public Module
 
        ModuleUHNames() : cap(this, "userhost-in-names")
        {
-               Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
-       ~ModuleUHNames()
+       void init() CXX11_OVERRIDE
        {
+               Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric };
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides the UHNAMES facility.",VF_VENDOR);
        }
 
-       void On005Numeric(std::string &output)
+       void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
        {
-               output.append(" UHNAMES");
+               tokens["UHNAMES"];
        }
 
-       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line)
+       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE
        {
                /* We don't actually create a proper command handler class for PROTOCTL,
                 * because other modules might want to have PROTOCTL hooks too.
@@ -67,7 +67,7 @@ class ModuleUHNames : public Module
                return MOD_RES_PASSTHRU;
        }
 
-       void OnNamesListItem(User* issuer, Membership* memb, std::string &prefixes, std::string &nick)
+       void OnNamesListItem(User* issuer, Membership* memb, std::string &prefixes, std::string &nick) CXX11_OVERRIDE
        {
                if (!cap.ext.get(issuer))
                        return;
@@ -78,7 +78,7 @@ class ModuleUHNames : public Module
                nick = memb->user->GetFullHost();
        }
 
-       void OnEvent(Event& ev)
+       void OnEvent(Event& ev) CXX11_OVERRIDE
        {
                cap.HandleEvent(ev);
        }