X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operchans.cpp;h=6e3ac1eada8d22fc9cbd25a9dac6fbcec3d8f0c8;hb=f51d9ad5ab7015f78a29039ca7ed169b281ff6bb;hp=4c3ae4798762b7271488794e26dca9f9970e2331;hpb=b57c7f4e466f72fdd2ac3deca42caa1ea7748338;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 4c3ae4798..6e3ac1ead 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -54,14 +54,12 @@ class ModuleOperChans : public Module { oc = new OperChans(ServerInstance); - if (!ServerInstance->AddMode(oc, 'O')) + if (!ServerInstance->Modes->AddMode(oc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } - void Implements(char* List) - { - List[I_OnUserPreJoin] = 1; - } virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs) { @@ -82,7 +80,7 @@ class ModuleOperChans : public Module virtual ~ModuleOperChans() { ServerInstance->Modes->DelMode(oc); - DELETE(oc); + delete oc; } virtual Version GetVersion()