]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_globops.cpp
Speaking of forgetting things, someone forgot to change the name of the function
[user/henk/code/inspircd.git] / src / modules / m_globops.cpp
index 2b2af1539f5c6026ac94c1608c248ac6db5898ca..77a35294aafda02ac7a1d33a574d967c288e3184 100644 (file)
@@ -27,12 +27,12 @@ using namespace std;
 
 /* $ModDesc: Provides support for GLOBOPS and user mode +g */
 
-static Server *Srv;
+
 
 class cmd_globops : public command_t
 {
  public:
      cmd_globops () : command_t("GLOBOPS",'o',1)
cmd_globops (InspIRCd* Instance) : command_t(Instance,"GLOBOPS",'o',1)
        {
                this->source = "m_globops.so";
                syntax = "<any-text>";
@@ -45,14 +45,14 @@ class cmd_globops : public command_t
                {
                        line = line + std::string(parameters[i]) + " ";
                }
-               Srv->SendToModeMask("og",WM_AND,line);
+               ServerInstance->WriteMode("og",WM_AND,line.c_str());
        }
 };
 
 class ModeGlobops : public ModeHandler
 {
  public:
-       ModeGlobops() : ModeHandler('g', 0, 0, false, MODETYPE_USER, true) { }
+       ModeGlobops(InspIRCd* Instance) : ModeHandler(Instance, 'g', 0, 0, false, MODETYPE_USER, true) { }
 
        ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
        {
@@ -83,14 +83,14 @@ class ModuleGlobops : public Module
        cmd_globops* mycommand;
        ModeGlobops* mg;
  public:
-       ModuleGlobops(Server* Me)
+       ModuleGlobops(InspIRCd* Me)
                : Module::Module(Me)
        {
-               Srv = Me;
-               mg = new ModeGlobops();
-               Srv->AddMode(mg, 'g');
-               mycommand = new cmd_globops();
-               Srv->AddCommand(mycommand);
+               
+               mg = new ModeGlobops(ServerInstance);
+               ServerInstance->AddMode(mg, 'g');
+               mycommand = new cmd_globops(ServerInstance);
+               ServerInstance->AddCommand(mycommand);
        }
        
        virtual ~ModuleGlobops()
@@ -120,7 +120,7 @@ class ModuleGlobopsFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
                return new ModuleGlobops(Me);
        }