X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_banexception.cpp;h=ef8dc4d9166ac6e05bf8f8b0847a21234a9b29fe;hb=2330fc9ddd48c939e894e7e37e9bb2e62eafc38d;hp=113af0b6b687d5abd7d84030b446572ad0a7b473;hpb=793d2364d907a73918eef1166b60f964ed0d384b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 113af0b6b..ef8dc4d91 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -20,7 +20,7 @@ class BanException : public ListModeBase { public: - BanException(Server* serv) : ListModeBase(serv, 'e', "End of Channel Exception List", "348", "349") { } + BanException(Server* serv) : ListModeBase(serv, 'e', "End of Channel Exception List", "348", "349", true) { } }; @@ -30,10 +30,12 @@ class ModuleBanException : public Module Server* Srv; public: - ModuleBanException(Server* serv) : Module(serv) + ModuleBanException(Server* serv) + : Module::Module(serv) { be = new BanException(serv); Srv = serv; + Srv->AddMode(be, 'e'); } virtual void Implements(char* List) @@ -52,7 +54,8 @@ public: { if(chan != NULL) { - modelist* list = (modelist*)chan->GetExt(be->GetInfoKey()); + modelist* list; + chan->GetExt(be->GetInfoKey(), list); Srv->Log(DEBUG, std::string(user->nick)+" is trying to join "+std::string(chan->name)+", checking for ban exceptions"); if(list) @@ -92,6 +95,11 @@ public: { return Version(1, 0, 0, 3, VF_STATIC | VF_VENDOR); } + + virtual ~ModuleBanException() + { + DELETE(be); + } }; class ModuleBanExceptionFactory : public ModuleFactory