aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_blockcaps.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-08-16 12:10:55 +0200
committerGravatar attilamolnar2013-08-30 13:15:10 +0200
commitc202dea024542b9c6c6b771bb9a3a081d9eacdc5 (patch)
tree64f4d5f5c18e685d3cd360107664eec644d5585d /src/modules/m_blockcaps.cpp
parentMerge insp20 (diff)
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on rehash
This eliminates the need for calling OnRehash() in init()
Diffstat (limited to 'src/modules/m_blockcaps.cpp')
-rw-r--r--src/modules/m_blockcaps.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index f80c6d16d..c3c8b2297 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -45,7 +45,6 @@ public:
void init() CXX11_OVERRIDE
{
- OnRehash(NULL);
ServerInstance->Modules->AddService(bc);
}
@@ -54,11 +53,6 @@ public:
tokens["EXTBAN"].push_back('B');
}
- void OnRehash(User* user) CXX11_OVERRIDE
- {
- ReadConf();
- }
-
ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
{
if (target_type == TYPE_CHANNEL)
@@ -101,7 +95,7 @@ public:
return MOD_RES_PASSTHRU;
}
- void ReadConf()
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("blockcaps");
percent = tag->getInt("percent", 100, 1, 100);