From e95a4358c193ddd3e60da28ae55b44986c73c4d0 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sat, 21 Aug 2010 00:48:01 -0400 Subject: Change config reading hook for better error reporting This eliminates the OnRehash hook, and replaces it with ReadConfig which is called on boot, module load, and rehash. --- src/modules/m_censor.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/modules/m_censor.cpp') diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 5b296b397..455d793da 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -48,13 +48,10 @@ class ModuleCensor : public Module void init() { - /* Read the configuration file on startup. - */ - OnRehash(NULL); ServerInstance->Modules->AddService(cu); ServerInstance->Modules->AddService(cc); - Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice }; - ServerInstance->Modules->Attach(eventlist, this, 3); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } @@ -108,7 +105,7 @@ class ModuleCensor : public Module return OnUserPreMessage(user,dest,target_type,text,status,exempt_list); } - virtual void OnRehash(User* user) + void ReadConfig(ConfigReadStatus&) { /* * reload our config file on rehash - we must destroy and re-allocate the classes -- cgit v1.3.1-10-gc9f91