diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
commit | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch) | |
tree | 43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/bs_autoassign.cpp | |
parent | 207c46c871e85b55ae66acc456c6bc412c0c79f9 (diff) |
Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Diffstat (limited to 'modules/bs_autoassign.cpp')
-rw-r--r-- | modules/bs_autoassign.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp index 13bde5ff5..134904925 100644 --- a/modules/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -19,8 +19,6 @@ class BSAutoAssign : public Module Implementation i[] = { I_OnChanRegistered, I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - this->OnReload(); } void OnChanRegistered(ChannelInfo *ci) anope_override @@ -38,10 +36,9 @@ class BSAutoAssign : public Module bi->Assign(NULL, ci); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - this->bot = config.ReadValue("bs_autoassign", "bot", "", 0); + this->bot = reader.ReadValue("bs_autoassign", "bot", "", 0); } }; |