X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operjoin.cpp;h=bd77384a604eb105d1d17fef1378f2a37c7fc2cc;hb=ac8a394a5c01d8cecd6d1fd364173825ecb452ae;hp=af787b815980ab35a454472cadc331accbe7b03a;hpb=553a8da754c8cd308bad2008018849714e70f9b7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index af787b815..bd77384a6 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -53,20 +53,20 @@ class ModuleOperjoin : public Module } public: - ModuleOperjoin() + void init() { OnRehash(NULL); Implementation eventlist[] = { I_OnPostOper, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual void OnRehash(User* user) { - ConfigReader conf; + ConfigTag* tag = ServerInstance->Config->ConfValue("operjoin"); - operChan = conf.ReadValue("operjoin", "channel", 0); - override = conf.ReadFlag("operjoin", "override", "0", 0); + operChan = tag->getString("channel"); + override = tag->getBool("override", false); operChans.clear(); if (!operChan.empty()) tokenize(operChan,operChans);