summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 17:27:48 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 17:27:48 +0000
commit5ec889c7e564e020eb00cf14b8958a9cb37c0702 (patch)
treef7ca8d045fdeaf2ea936ba92751be7b9df203824 /src/modules
parent30b7ea53bde0962132314775c939a5eac0a8922e (diff)
Make the same (r6972) fix here.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6973 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-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()