diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-13 03:12:29 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-12-02 19:39:46 +0100 |
commit | ac7defcd3e52695dcf5e5150e9fe3e1624205e64 (patch) | |
tree | da428a276376986ca64390d5cf5662083f8197c6 /src/modules/m_swhois.cpp | |
parent | 6dd61235fc8cb67ba9919b84be42c966b7273fac (diff) |
Attach to events and register services in init()
Diffstat (limited to 'src/modules/m_swhois.cpp')
-rw-r--r-- | src/modules/m_swhois.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index a98c06c75..eeb7a8d67 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -36,7 +36,6 @@ class CommandSwhois : public Command CommandSwhois(Module* Creator) : Command(Creator,"SWHOIS", 2,2), swhois("swhois", Creator) { flags_needed = 'o'; syntax = "<nick> :<swhois>"; - ServerInstance->Extensions.Register(&swhois); TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } @@ -89,7 +88,12 @@ class ModuleSWhois : public Module public: ModuleSWhois() : cmd(this) { + } + + void init() + { ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd.swhois); Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper }; ServerInstance->Modules->Attach(eventlist, this, 2); } |