aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_censor.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-08-21 00:48:01 -0400
committerGravatar Daniel De Graaf2010-08-21 11:13:59 -0400
commite95a4358c193ddd3e60da28ae55b44986c73c4d0 (patch)
treee4b421090688f558011e767789706bf8aa487195 /src/modules/m_censor.cpp
parentPrevent changing +r when already set (diff)
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.
Diffstat (limited to 'src/modules/m_censor.cpp')
-rw-r--r--src/modules/m_censor.cpp9
1 files changed, 3 insertions, 6 deletions
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