X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operchans.cpp;h=f31979cea8dd78049d356a1768febdb299987836;hb=46e56dedd37abe33af4e8b970d5b83729dc1ef05;hp=5fe891b50a225f3e37a51ab069776dd8f7e61845;hpb=6d715e128f9cea6c25cc57dc23c1bccdbbfda475;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 5fe891b50..f31979cea 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-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -19,7 +19,7 @@ class OperChans : public ModeHandler { public: /* This is an oper-only mode */ - OperChans(Module* Creator) : ModeHandler(Creator, 'O', PARAM_NONE, MODETYPE_CHANNEL) { oper = true; } + OperChans(Module* Creator) : ModeHandler(Creator, "operonly", 'O', PARAM_NONE, MODETYPE_CHANNEL) { oper = true; } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -71,7 +71,7 @@ class ModuleOperChans : public Module { if (mask[0] == 'O' && mask[1] == ':') { - if (IS_OPER(user) && InspIRCd::Match(user->oper, mask.substr(2))) + if (IS_OPER(user) && InspIRCd::Match(user->oper->name, mask.substr(2))) return MOD_RES_DENY; } return MOD_RES_PASSTHRU; @@ -84,12 +84,11 @@ class ModuleOperChans : public Module ~ModuleOperChans() { - ServerInstance->Modes->DelMode(&oc); } Version GetVersion() { - return Version("Provides support for oper-only chans via the +O channel mode and 'O' extban", VF_VENDOR | VF_COMMON, API_VERSION); + return Version("Provides support for oper-only chans via the +O channel mode and 'O' extban", VF_VENDOR); } };