]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Reset the already_sent IDs during slow garbage collection
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 5fe891b50a225f3e37a51ab069776dd8f7e61845..f31979cea8dd78049d356a1768febdb299987836 100644 (file)
@@ -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 &parameter, 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);
        }
 };