summaryrefslogtreecommitdiff
path: root/src/modules/m_operjoin.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 16:01:33 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 16:01:33 +0000
commita59d08fffd3dc8a9850ce34c9928fb6382b9b37f (patch)
tree1d5debd7915dddc122feec50443f42d535cba311 /src/modules/m_operjoin.cpp
parentda6e45397e4ee86d6caf86d2fd5fd8f77af48a1e (diff)
Remove VF_SERVICEPROVIDER, prevent heap allocation of ConfigReader
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11904 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operjoin.cpp')
-rw-r--r--src/modules/m_operjoin.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index 772bef525..42b30f6fb 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -43,36 +43,35 @@ class ModuleOperjoin : public Module
}
public:
- ModuleOperjoin() {
+ ModuleOperjoin()
+ {
OnRehash(NULL);
- Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual void OnRehash(User* user)
{
- ConfigReader* conf = new ConfigReader;
+ ConfigReader conf;
- operChan = conf->ReadValue("operjoin", "channel", 0);
- override = conf->ReadFlag("operjoin", "override", "0", 0);
+ operChan = conf.ReadValue("operjoin", "channel", 0);
+ override = conf.ReadFlag("operjoin", "override", "0", 0);
operChans.clear();
if (!operChan.empty())
tokenize(operChan,operChans);
std::map<std::string, std::vector<std::string> >().swap(operTypeChans);
- int olines = conf->Enumerate("type");
+ int olines = conf.Enumerate("type");
for (int index = 0; index < olines; ++index)
{
- std::string chanList = conf->ReadValue("type", "autojoin", index);
+ std::string chanList = conf.ReadValue("type", "autojoin", index);
if (!chanList.empty())
{
- tokenize(chanList, operTypeChans[conf->ReadValue("type", "name", index)]);
+ tokenize(chanList, operTypeChans[conf.ReadValue("type", "name", index)]);
}
}
-
- delete conf;
}
virtual ~ModuleOperjoin()