X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_helpop.cpp;h=7d7e9663ae6734c434dbc961d3da35e21399efe2;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=92abcd76f9582bb589765028a153b38ba4c8874b;hpb=84a1569cd60daa64b1ae52a1fff62c0dc4d78850;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 92abcd76f..7d7e9663a 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -21,8 +21,6 @@ */ -/* $ModDesc: Provides the /HELPOP command for useful information */ - #include "inspircd.h" static std::map helpop_map; @@ -98,7 +96,6 @@ class CommandHelpop : public Command class ModuleHelpop : public Module { - private: std::string h_file; CommandHelpop cmd; Helpop ho; @@ -109,13 +106,11 @@ class ModuleHelpop : public Module { } - void init() + void init() CXX11_OVERRIDE { ReadConfig(); ServerInstance->Modules->AddService(ho); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnRehash, I_OnWhois }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void ReadConfig() @@ -151,20 +146,20 @@ class ModuleHelpop : public Module } - void OnRehash(User* user) + void OnRehash(User* user) CXX11_OVERRIDE { ReadConfig(); } - void OnWhois(User* src, User* dst) + void OnWhois(User* src, User* dst) CXX11_OVERRIDE { - if (dst->IsModeSet('h')) + if (dst->IsModeSet(ho)) { ServerInstance->SendWhoisLine(src, dst, 310, src->nick+" "+dst->nick+" :is available for help."); } } - Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the /HELPOP command for useful information", VF_VENDOR); }