X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_globops.cpp;h=f02f8a1b227fe3c5c0bdc960318006ca29d1015b;hb=46e56dedd37abe33af4e8b970d5b83729dc1ef05;hp=fafc3df2cc5e4e8d8b85fbc4413fb1a448eb7c83;hpb=d185decae97752368d5cf62311cbc0d1a52aa22c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index fafc3df2c..f02f8a1b2 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2010 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -22,10 +22,9 @@ class CommandGlobops : public Command { public: - CommandGlobops (InspIRCd* Instance) : Command(Instance,"GLOBOPS","o",1) + CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1) { - this->source = "m_globops.so"; - syntax = ""; + flags_needed = 'o'; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } @@ -37,21 +36,20 @@ class CommandGlobops : public Command line = line + parameters[i] + " "; } ServerInstance->SNO->WriteToSnoMask('g',line); + ServerInstance->PI->SendSNONotice("g", line); - /* route it (ofc :p) */ return CMD_SUCCESS; } }; class ModuleGlobops : public Module { - CommandGlobops* mycommand; + CommandGlobops cmd; public: - ModuleGlobops(InspIRCd* Me) - : Module(Me) + ModuleGlobops() + : cmd(this) { - mycommand = new CommandGlobops(ServerInstance); - ServerInstance->AddCommand(mycommand); + ServerInstance->AddCommand(&cmd); ServerInstance->SNO->EnableSnomask('g',"GLOBOPS"); } @@ -63,7 +61,7 @@ class ModuleGlobops : public Module virtual Version GetVersion() { - return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION); + return Version("Provides support for GLOBOPS and user mode +g", VF_OPTCOMMON | VF_VENDOR); } };