From 5d474dc9fbd9bd36d0a0a8df93e1ec1e180864d7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 17 Jan 2010 17:10:45 +0000 Subject: Move initialization that throws configuration exceptions to init() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12279 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_helpop.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules/m_helpop.cpp') diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index cbb56c3f9..5cd8d8ea0 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -118,16 +118,19 @@ class ModuleHelpop : public Module public: ModuleHelpop() : cmd(this), ho(this) + { + } + + void init() { ReadConfig(); - if (!ServerInstance->Modes->AddMode(&ho)) - throw ModuleException("Could not add new modes!"); - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(ho); + ServerInstance->Modules->AddService(cmd); Implementation eventlist[] = { I_OnRehash, I_OnWhois }; ServerInstance->Modules->Attach(eventlist, this, 2); } - virtual void ReadConfig() + void ReadConfig() { ConfigReader MyConf; -- cgit v1.3.1-10-gc9f91