summaryrefslogtreecommitdiff
path: root/src/modules/m_uhnames.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_uhnames.cpp')
-rw-r--r--src/modules/m_uhnames.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp
index 2cd090f97..2534afb97 100644
--- a/src/modules/m_uhnames.cpp
+++ b/src/modules/m_uhnames.cpp
@@ -20,9 +20,7 @@
#include "inspircd.h"
-#include "m_cap.h"
-
-/* $ModDesc: Provides the UHNAMES facility. */
+#include "modules/cap.h"
class ModuleUHNames : public Module
{
@@ -33,27 +31,17 @@ class ModuleUHNames : public Module
{
}
- void init()
- {
- Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- }
-
- ~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.
@@ -71,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;
@@ -82,7 +70,7 @@ class ModuleUHNames : public Module
nick = memb->user->GetFullHost();
}
- void OnEvent(Event& ev)
+ void OnEvent(Event& ev) CXX11_OVERRIDE
{
cap.HandleEvent(ev);
}