1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 // Globops and +g support module by C.J.Edwards
18 /* $ModDesc: Provides support for GLOBOPS and user mode +g */
22 class CommandGlobops : public Command
25 CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1)
27 flags_needed = 'o'; syntax = "<any-text>";
28 TRANSLATE2(TR_TEXT, TR_END);
31 CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
33 std::string line = "From " + std::string(user->nick) + ": ";
34 for (int i = 0; i < (int)parameters.size(); i++)
36 line = line + parameters[i] + " ";
38 ServerInstance->SNO->WriteGlobalSno('g',line);
44 class ModuleGlobops : public Module
48 ModuleGlobops() : cmd(this) {}
52 ServerInstance->AddCommand(&cmd);
53 ServerInstance->SNO->EnableSnomask('g',"GLOBOPS");
56 virtual Version GetVersion()
58 return Version("Provides support for GLOBOPS and user mode +g", VF_VENDOR);
63 MODULE_INIT(ModuleGlobops)