summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_conn_join.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index 2cc6274a2..a2c45641c 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -22,7 +22,6 @@ class ModuleConnJoin : public Module
{
private:
std::string JoinChan;
- ConfigReader* conf;
std::vector<std::string> Joinchans;
@@ -49,11 +48,7 @@ class ModuleConnJoin : public Module
ModuleConnJoin(InspIRCd* Me)
: Module::Module(Me)
{
- conf = new ConfigReader(ServerInstance);
- JoinChan = conf->ReadValue("autojoin", "channel", 0);
- Joinchans.clear();
- if (!JoinChan.empty())
- tokenize(JoinChan,Joinchans);
+ OnRehash(NULL, "");
}
void Implements(char* List)
@@ -63,17 +58,16 @@ class ModuleConnJoin : public Module
virtual void OnRehash(userrec* user, const std::string &parameter)
{
- DELETE(conf);
- conf = new ConfigReader(ServerInstance);
+ ConfigReader* conf = new ConfigReader(ServerInstance);
JoinChan = conf->ReadValue("autojoin", "channel", 0);
Joinchans.clear();
if (!JoinChan.empty())
tokenize(JoinChan,Joinchans);
+ DELETE(conf);
}
virtual ~ModuleConnJoin()
{
- DELETE(conf);
}
virtual Version GetVersion()