X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operjoin.cpp;h=2f5dda0ff4a55425d690c028ac979e5a26a3091a;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=b717ac3ef6f50fb78fe22aad3a571472e03c9ccf;hpb=a4db7bf9af00b32d4f5c1922997d02b0b8be59e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index b717ac3ef..2f5dda0ff 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -28,7 +28,6 @@ class ModuleOperjoin : public Module { - private: std::string operChan; std::vector operChans; bool override; @@ -53,11 +52,11 @@ 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)); } @@ -72,10 +71,6 @@ class ModuleOperjoin : public Module tokenize(operChan,operChans); } - virtual ~ModuleOperjoin() - { - } - virtual Version GetVersion() { return Version("Forces opers to join the specified channel(s) on oper-up", VF_VENDOR); @@ -90,7 +85,7 @@ class ModuleOperjoin : public Module if (ServerInstance->IsChannel(it->c_str(), ServerInstance->Config->Limits.ChanMax)) Channel::JoinUser(user, it->c_str(), override, "", false, ServerInstance->Time()); - std::string chanList = IS_OPER(user)->getConfig("autojoin"); + std::string chanList = user->oper->getConfig("autojoin"); if (!chanList.empty()) { std::vector typechans;