]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_opermodes.cpp
Reset the already_sent IDs during slow garbage collection
[user/henk/code/inspircd.git] / src / modules / m_opermodes.cpp
index 6b5ca10f95de62d70a3c0425dd1b8b6a8a86b05a..5cd2674a3d6e15b28e458efc1f0f5ab7456eaa55 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
@@ -48,24 +48,6 @@ class ModuleModesOnOper : public Module
                {
                        ApplyModes(user, ThisOpersModes);
                }
-
-               if (!opername.empty()) // if user is local ..
-               {
-                       for (int i = 0;; i++)
-                       {
-                               ConfigTag* tag = ServerInstance->Config->ConfValue("oper", i);
-                               if (!tag)
-                                       break;
-                               if (tag->getString("name") != opername)
-                                       continue;
-                               ThisOpersModes = tag->getString("modes");
-                               if (!ThisOpersModes.empty())
-                               {
-                                       ApplyModes(user, ThisOpersModes);
-                               }
-                               break;
-                       }
-               }
        }
 
        void ApplyModes(User *u, std::string &smodes)
@@ -91,8 +73,7 @@ class ModuleModesOnOper : public Module
                        modes.push_back(tokens[k]);
                }
 
-               ServerInstance->SendMode(modes, u);
-               ServerInstance->PI->SendMode(u->uuid, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate());
+               ServerInstance->SendGlobalMode(modes, u);
        }
 };