]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_uhnames.cpp
Change allocation of UserManager::clientlist to be physically part of the object...
[user/henk/code/inspircd.git] / src / modules / m_uhnames.cpp
index 5693eb8070b8006a9907f55bfbf4af0cf256e808..2534afb9748d847a8ea704d93d8077a298e7904f 100644 (file)
@@ -20,9 +20,7 @@
 
 
 #include "inspircd.h"
-#include "m_cap.h"
-
-/* $ModDesc: Provides the UHNAMES facility. */
+#include "modules/cap.h"
 
 class ModuleUHNames : public Module
 {
@@ -30,26 +28,20 @@ class ModuleUHNames : public Module
        GenericCap cap;
 
        ModuleUHNames() : cap(this, "userhost-in-names")
-       {
-               Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
-       }
-
-       ~ModuleUHNames()
        {
        }
 
-       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 +59,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 +70,7 @@ class ModuleUHNames : public Module
                nick = memb->user->GetFullHost();
        }
 
-       void OnEvent(Event& ev)
+       void OnEvent(Event& ev) CXX11_OVERRIDE
        {
                cap.HandleEvent(ev);
        }