From 5ec889c7e564e020eb00cf14b8958a9cb37c0702 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 11 May 2007 17:27:48 +0000 Subject: Make the same (r6972) fix here. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6973 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_conn_join.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/modules') 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 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 ¶meter) { - 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() -- cgit v1.2.3