X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_uhnames.cpp;h=3e504b8e52a353f25c32c8b21dd3a3c33d3a1e99;hb=5c9427cde0a949a17a476311db0a2a275345337b;hp=5693eb8070b8006a9907f55bfbf4af0cf256e808;hpb=388e4ff40931dda5870ddef149e54bdcc6c5a711;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 5693eb807..3e504b8e5 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -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& tokens) CXX11_OVERRIDE { - output.append(" UHNAMES"); + tokens["UHNAMES"]; } - ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) + ModResult OnPreCommand(std::string &command, std::vector ¶meters, 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); }