2014-08-04 08:36:20 +00:00
|
|
|
// vim: set ts=4 sw=4 tw=99 noet:
|
|
|
|
//
|
|
|
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
|
|
|
// Copyright (C) The AMX Mod X Development Team.
|
|
|
|
//
|
|
|
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
|
|
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
|
|
|
// https://alliedmods.net/amxmodx-license
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2004-03-24 01:35:44 +00:00
|
|
|
#include "amxmodx.h"
|
2014-02-09 04:37:33 +00:00
|
|
|
#include <amxmodx_version.h>
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
void amx_command()
|
|
|
|
{
|
|
|
|
const char* cmd = CMD_ARGV(1);
|
2004-04-22 08:07:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
|
|
|
|
{
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Currently loaded plugins:\n");
|
2007-10-26 01:41:45 +00:00
|
|
|
print_srvconsole(" %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
int plugins = 0;
|
|
|
|
int running = 0;
|
2004-04-22 08:07:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
CPluginMngr::iterator a = g_plugins.begin();
|
|
|
|
|
|
|
|
while (a)
|
|
|
|
{
|
|
|
|
++plugins;
|
|
|
|
if ((*a).isValid() && !(*a).isPaused())
|
|
|
|
++running;
|
2004-09-10 15:52:48 +00:00
|
|
|
|
2007-10-26 01:41:45 +00:00
|
|
|
print_srvconsole(" [%3d] %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", plugins, (*a).getTitle(), (*a).getVersion(), (*a).getAuthor(), (*a).getName(), (*a).getStatus());
|
2005-09-10 20:09:14 +00:00
|
|
|
++a;
|
|
|
|
}
|
2004-09-10 15:52:48 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
a = g_plugins.begin();
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-12-01 13:42:28 +00:00
|
|
|
int num = 0;
|
2005-09-10 20:09:14 +00:00
|
|
|
while (a)
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2005-12-01 13:42:28 +00:00
|
|
|
num++;
|
2005-09-10 20:09:14 +00:00
|
|
|
if ((*a).getStatusCode() == ps_bad_load)
|
|
|
|
{
|
|
|
|
//error
|
2005-12-01 13:42:28 +00:00
|
|
|
print_srvconsole("(%3d) Load fails: %s\n", num, (*a).getError());
|
|
|
|
} else if ( (*a).getStatusCode() == ps_error) {
|
|
|
|
//error
|
|
|
|
print_srvconsole("(%3d) Error: %s\n", num, (*a).getError());
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
++a;
|
|
|
|
}
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("%d plugins, %d running\n", plugins, running);
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2)
|
|
|
|
{
|
|
|
|
const char* sPlugin = CMD_ARGV(2);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
if (plugin && plugin->isValid())
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2007-02-19 06:57:26 +00:00
|
|
|
if (plugin->isPaused())
|
|
|
|
{
|
|
|
|
if (plugin->isStopped())
|
|
|
|
{
|
|
|
|
print_srvconsole("Plugin \"%s\" is stopped and may not be paused.\n",plugin->getName());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
print_srvconsole("Plugin \"%s\" is already paused.\n",plugin->getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
plugin->pausePlugin();
|
|
|
|
print_srvconsole("Paused plugin \"%s\"\n", plugin->getName());
|
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
else
|
2007-02-19 06:57:26 +00:00
|
|
|
{
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
2007-02-19 06:57:26 +00:00
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2)
|
|
|
|
{
|
|
|
|
const char* sPlugin = CMD_ARGV(2);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
if (plugin && plugin->isValid() && plugin->isPaused())
|
|
|
|
{
|
2007-02-19 06:57:26 +00:00
|
|
|
if (plugin->isStopped())
|
|
|
|
{
|
|
|
|
print_srvconsole("Plugin \"%s\" is stopped and may not be unpaused.\n", plugin->getName());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
plugin->unpausePlugin();
|
|
|
|
print_srvconsole("Unpaused plugin \"%s\"\n", plugin->getName());
|
|
|
|
}
|
2004-01-31 20:56:22 +00:00
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
else if (!plugin)
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
|
|
|
|
} else {
|
2007-02-19 06:57:26 +00:00
|
|
|
print_srvconsole("Plugin %s can't be unpaused right now.\n", sPlugin);
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "cvars"))
|
|
|
|
{
|
|
|
|
print_srvconsole("Registered cvars:\n");
|
|
|
|
print_srvconsole(" %-24.23s %-24.23s %-16.15s\n", "name", "value", "plugin");
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
int ammount = 0;
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2007-06-21 15:26:02 +00:00
|
|
|
if (CMD_ARGC() > 2) // Searching for cvars registered to a plugin
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2007-06-21 15:26:02 +00:00
|
|
|
const char* targetname = CMD_ARGV(2);
|
|
|
|
size_t len = strlen(targetname);
|
|
|
|
for (CList<CCVar>::iterator a = g_cvars.begin(); a; ++a)
|
|
|
|
{
|
|
|
|
if (strncmp((*a).getPluginName(), targetname, len) == 0)
|
|
|
|
{
|
|
|
|
print_srvconsole(" [%3d] %-24.23s %-24.23s %-16.15s\n", ++ammount, (*a).getName(), CVAR_GET_STRING((*a).getName()), (*a).getPluginName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // No search
|
|
|
|
{
|
|
|
|
for (CList<CCVar>::iterator a = g_cvars.begin(); a; ++a)
|
|
|
|
{
|
|
|
|
print_srvconsole(" [%3d] %-24.23s %-24.23s %-16.15s\n", ++ammount, (*a).getName(), CVAR_GET_STRING((*a).getName()), (*a).getPluginName());
|
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
print_srvconsole("%d cvars\n", ammount);
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "cmds"))
|
|
|
|
{
|
|
|
|
print_srvconsole("Registered commands:\n");
|
|
|
|
print_srvconsole(" %-24.23s %-16.15s %-8.7s %-16.15s\n", "name", "access", "type", "plugin");
|
2004-04-22 08:07:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
int ammount = 0;
|
|
|
|
char access[32];
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
CmdMngr::iterator a = g_commands.begin(CMD_ConsoleCommand);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2007-06-21 15:26:02 +00:00
|
|
|
if (CMD_ARGC() > 2) // Searching for commands registered to a plugin
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2007-06-21 15:26:02 +00:00
|
|
|
const char* targetname = CMD_ARGV(2);
|
|
|
|
size_t len = strlen(targetname);
|
|
|
|
while (a)
|
|
|
|
{
|
|
|
|
if (strncmp((*a).getPlugin()->getName(), targetname, len) == 0)
|
|
|
|
{
|
|
|
|
UTIL_GetFlags(access, (*a).getFlags());
|
|
|
|
print_srvconsole(" [%3d] %-24.23s %-16.15s %-8.7s %-16.15s\n", ++ammount, (*a).getCmdLine(), access, (*a).getCmdType(), (*a).getPlugin()->getName());
|
|
|
|
}
|
|
|
|
++a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // No search
|
|
|
|
{
|
|
|
|
while (a)
|
|
|
|
{
|
|
|
|
UTIL_GetFlags(access, (*a).getFlags());
|
|
|
|
print_srvconsole(" [%3d] %-24.23s %-16.15s %-8.7s %-16.15s\n", ++ammount, (*a).getCmdLine(), access, (*a).getCmdType(), (*a).getPlugin()->getName());
|
|
|
|
++a;
|
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
print_srvconsole("%d commands\n",ammount);
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "version"))
|
|
|
|
{
|
2006-03-04 08:52:08 +00:00
|
|
|
print_srvconsole("%s %s (%s)\n", Plugin_info.name, Plugin_info.version, Plugin_info.url);
|
2006-09-10 06:35:54 +00:00
|
|
|
print_srvconsole("Authors:\n\tDavid \"BAILOPAN\" Anderson, Pavol \"PM OnoTo\" Marko\n");
|
2006-03-04 08:52:08 +00:00
|
|
|
print_srvconsole("\tFelix \"SniperBeamer\" Geyer, Jonny \"Got His Gun\" Bergstrom\n");
|
|
|
|
print_srvconsole("\tLukasz \"SidLuke\" Wlasinski, Christian \"Basic-Master\" Hammacher\n");
|
2013-02-13 09:23:27 +00:00
|
|
|
print_srvconsole("\tBorja \"faluco\" Ferrer, Scott \"DS\" Ehlert\n");
|
2014-12-08 00:41:52 +00:00
|
|
|
print_srvconsole("Compiled: %s\n", AMXX_BUILD_TIME);
|
|
|
|
#if defined(AMXX_GENERATED_BUILD)
|
|
|
|
print_srvconsole("Built from: https://github.com/alliedmodders/amxmodx/commit/%s", AMXX_SHA);
|
|
|
|
print_srvconsole("Build ID: %s:%s", AMXX_LOCAL_REV, AMXX_SHA);
|
|
|
|
#endif
|
2005-07-25 06:03:43 +00:00
|
|
|
#if defined JIT && !defined ASM32
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Core mode: JIT Only\n");
|
2005-07-25 06:03:43 +00:00
|
|
|
#elif !defined JIT && defined ASM32
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Core mode: ASM32 Only\n");
|
2005-07-25 06:03:43 +00:00
|
|
|
#elif defined JIT && defined ASM32
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Core mode: JIT+ASM32\n");
|
2004-09-06 22:27:55 +00:00
|
|
|
#else
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Core mode: Normal\n");
|
2004-09-06 22:27:55 +00:00
|
|
|
#endif
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "modules"))
|
|
|
|
{
|
|
|
|
print_srvconsole("Currently loaded modules:\n");
|
2007-10-26 01:41:45 +00:00
|
|
|
print_srvconsole(" %-23.22s %-11.10s %-20.19s %-11.10s\n", "name", "version", "author", "status");
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
int running = 0;
|
|
|
|
int modules = 0;
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
CList<CModule,const char *>::iterator a = g_modules.begin();
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
while (a)
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2005-09-10 20:09:14 +00:00
|
|
|
if ((*a).getStatusValue() == MODULE_LOADED)
|
|
|
|
++running;
|
|
|
|
++modules;
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2007-10-26 01:41:45 +00:00
|
|
|
print_srvconsole(" [%2d] %-23.22s %-11.10s %-20.19s %-11.10s\n", modules, (*a).getName(), (*a).getVersion(), (*a).getAuthor(), (*a).getStatus());
|
2005-09-10 20:09:14 +00:00
|
|
|
++a;
|
2004-04-22 08:07:22 +00:00
|
|
|
}
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("%d modules, %d correct\n", modules, running);
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "gpl"))
|
|
|
|
{
|
|
|
|
print_srvconsole("AMX Mod X\n");
|
|
|
|
print_srvconsole("\n");
|
2014-08-04 19:31:28 +00:00
|
|
|
print_srvconsole(" Based on AMX Mod by Aleksander Naszko (\"OLO\").\n");
|
|
|
|
print_srvconsole(" Copyright (C) The AMX Mod X Development Team.\n");
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("\n");
|
2014-08-04 19:31:28 +00:00
|
|
|
print_srvconsole(" This software is licensed under the GNU General Public License, version 3 or\n");
|
|
|
|
print_srvconsole(" higher. Additional exceptions apply. For full license details, see LICENSE.txt\n");
|
|
|
|
print_srvconsole(" or visit:\n");
|
|
|
|
print_srvconsole(" https://alliedmods.net/amxmodx-license\n");
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("\n");
|
|
|
|
}
|
|
|
|
else if (!strcmp(cmd, "\x74\x75\x72\x74\x6C\x65")) // !! Hidden Command :D !!
|
|
|
|
{
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2E\x2E\x3A\x3A\x3E\x3E\x3A\x3A\x3B\x3E\x5E\x27\x2E\x27\x27\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27\x3A\x3A\x3F\x3D\x3E\x3E\x3E\x3E\x3E\x3D\x3F\x3E\x78\x2B\x3F\x3E\x3E\x3E\x3D\x3E\x3F\x2B\x3F\x3E\x3B\x2E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x2E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27\x2C\x3A\x3E\x3B\x3F\x3D\x3E\x3B\x2E\x27\x5E\x5E\x3B\x3B\x2C\x3A\x3F\x3F\x3D\x78\x3F\x3B\x3E\x3A\x3B\x3A\x5E\x3B\x3D\x3E\x2B\x2B\x2B\x2B\x3D\x2C\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x2C\x3E\x37\x24\x24\x78\x3D\x3D\x3D\x3F\x3A\x27\x20\x20\x20\x20\x20\x20\x20\x2E\x3A\x3B\x3D\x3E\x3A\x3A\x3A\x3A\x3F\x3F\x3F\x3E\x5E\x2C\x2E\x2E\x2C\x2C\x2C\x2C\x3A\x3B\x3D\x3D\x3B\x5E\x2C\x2C\x2C\x3A\x5E\x3A\x3F\x3F\x3E\x3D\x3D\x3E\x3E\x2B\x3B\x27\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x2C\x3D\x2B\x3E\x2C\x5E\x3D\x79\x24\x33\x78\x33\x24\x5A\x24\x3B\x20\x20\x3A\x3E\x2B\x3E\x3D\x3F\x5E\x2C\x2C\x2C\x5E\x5E\x3E\x3D\x3E\x3B\x3B\x3A\x5E\x5E\x3E\x3F\x3D\x2B\x37\x3D\x3F\x3E\x3E\x3E\x3F\x3D\x3F\x3F\x3D\x3D\x3D\x3D\x3E\x3F\x3D\x3E\x3E\x3E\x3D\x5A\x78\x3E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x3D\x5A\x24\x37\x78\x66\x68\x78\x5A\x5A\x24\x79\x79\x71\x23\x23\x4D\x71\x3B\x3A\x3B\x3A\x3E\x3B\x3B\x2C\x5E\x3E\x3F\x3D\x3F\x3A\x2C\x2C\x3A\x3B\x3B\x3E\x3E\x3D\x2B\x3D\x3E\x3D\x3B\x3A\x3E\x3D\x2B\x3D\x2B\x37\x2B\x3D\x2B\x37\x37\x2B\x2B\x33\x33\x33\x37\x37\x24\x5A\x79\x3A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x5E\x2B\x5A\x2B\x3E\x3D\x37\x5A\x66\x40\x40\x23\x40\x48\x23\x23\x23\x38\x5E\x3B\x3D\x3F\x2B\x3E\x3B\x3E\x5E\x5E\x2C\x27\x2E\x27\x2E\x2E\x5E\x3F\x3D\x3D\x3F\x3A\x3B\x3A\x3A\x3A\x5E\x5E\x3E\x3E\x3F\x3D\x37\x37\x3D\x3D\x37\x2B\x3D\x37\x2B\x37\x78\x24\x79\x38\x68\x45\x48\x79\x3E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x2C\x3E\x3E\x78\x33\x68\x48\x23\x23\x40\x40\x48\x45\x66\x33\x20\x2C\x3A\x3E\x3E\x3E\x3B\x3B\x3A\x3A\x2C\x2E\x2C\x5E\x3A\x2C\x5E\x3B\x3E\x37\x37\x3F\x3B\x3A\x2E\x3A\x3A\x3B\x3D\x3B\x3B\x3D\x2B\x3D\x78\x33\x37\x3E\x3D\x3D\x2B\x37\x2B\x78\x78\x78\x78\x5A\x66\x71\x68\x38\x45\x27\x20\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x3A\x37\x37\x24\x66\x71\x45\x45\x71\x45\x3A\x3A\x2C\x5E\x3A\x3E\x3A\x3A\x3B\x3B\x5E\x3A\x2C\x5E\x5E\x2C\x2C\x5E\x3A\x3E\x2B\x33\x3D\x3E\x3A\x3A\x3A\x3D\x2B\x2B\x3D\x3F\x3F\x37\x37\x2B\x37\x3D\x3D\x5A\x33\x78\x33\x37\x78\x24\x5A\x33\x37\x38\x40\x71\x38\x66\x40\x2C\x20\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5E\x2B\x5A\x45\x40\x5E\x5E\x5E\x3A\x2C\x3A\x3B\x3E\x3A\x5E\x5E\x2C\x2E\x2E\x2C\x5E\x3B\x3B\x3A\x2B\x3E\x3F\x3B\x3F\x3F\x3F\x3F\x3E\x3F\x3D\x37\x3B\x3B\x3D\x33\x2B\x3D\x3D\x78\x78\x5A\x78\x33\x78\x5A\x5A\x5A\x24\x71\x48\x79\x5A\x24\x79\x45\x3E\x20\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x27\x3B\x2C\x2C\x27\x5E\x5E\x2C\x3A\x5E\x3A\x3A\x5E\x3A\x3B\x3F\x3E\x3F\x3E\x3B\x3E\x3E\x3F\x3D\x2B\x37\x37\x2B\x2B\x3D\x2B\x37\x2B\x37\x37\x2B\x3B\x3D\x33\x2B\x2B\x37\x37\x2B\x3D\x78\x78\x66\x78\x78\x37\x33\x66\x78\x38\x23\x23\x27\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3A\x3F\x3B\x5E\x2C\x3B\x3F\x3D\x3F\x3F\x3B\x3A\x3A\x3A\x3E\x3F\x3E\x3E\x3F\x3A\x3F\x33\x78\x78\x33\x24\x24\x33\x2B\x37\x78\x24\x78\x33\x3D\x2B\x2B\x5A\x24\x78\x24\x78\x33\x33\x24\x5A\x79\x24\x24\x24\x68\x45\x48\x38\x68\x45\x40\x3E\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2C\x3A\x3E\x3F\x37\x3D\x3E\x3F\x2B\x3F\x3F\x3E\x3F\x3F\x3F\x3D\x3F\x3E\x3F\x3D\x37\x2B\x3E\x3E\x2B\x37\x37\x33\x37\x33\x78\x33\x33\x33\x78\x37\x37\x37\x78\x5A\x78\x5A\x79\x79\x5A\x24\x79\x79\x79\x79\x79\x68\x71\x38\x38\x71\x23\x23\x45\x37\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5E\x2B\x2B\x3F\x2B\x78\x40\x38\x3F\x3B\x3E\x3B\x3B\x3E\x3F\x37\x2B\x3F\x3F\x3D\x3D\x3E\x3F\x2B\x37\x37\x37\x37\x33\x33\x78\x78\x33\x37\x24\x5A\x78\x5A\x5A\x78\x24\x33\x3D\x37\x37\x37\x78\x24\x5A\x78\x37\x37\x78\x66\x79\x66\x71\x66\x40\x45\x40\x3A\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2B\x3A\x3F\x2B\x3D\x2B\x79\x23\x79\x3B\x2C\x3A\x3A\x3A\x37\x78\x3F\x3E\x3B\x3E\x3B\x3E\x3D\x37\x24\x33\x37\x33\x37\x78\x78\x33\x24\x68\x79\x33\x24\x78\x2B\x33\x33\x5A\x79\x24\x5A\x79\x24\x5A\x37\x24\x5A\x5A\x66\x38\x66\x79\x66\x40\x71\x45\x48\x5A\x3A\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5E\x37\x3D\x37\x37\x33\x37\x37\x66\x45\x5A\x3F\x5E\x5E\x78\x37\x3D\x3F\x3E\x3B\x3B\x3E\x2B\x2B\x24\x78\x37\x2B\x37\x2B\x37\x78\x78\x71\x79\x33\x33\x24\x24\x78\x24\x5A\x3F\x37\x78\x24\x78\x79\x66\x5A\x78\x79\x66\x79\x68\x79\x66\x5A\x33\x3F\x3D\x3D\x20\x20\x20\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5E\x2B\x3D\x3F\x37\x37\x78\x33\x5A\x4E\x4D\x23\x38\x33\x3F\x3E\x3B\x3E\x3B\x3D\x3D\x33\x66\x24\x78\x33\x2B\x78\x24\x5A\x24\x5A\x71\x79\x78\x33\x33\x78\x79\x5A\x5A\x33\x66\x24\x78\x78\x24\x79\x5A\x24\x79\x5A\x37\x66\x24\x3D\x3B\x66\x23\x4D\x4D\x4D\x79\x3B\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3A\x33\x37\x37\x24\x78\x66\x79\x48\x4D\x4D\x4D\x4D\x23\x71\x68\x5A\x24\x5A\x79\x68\x68\x5A\x5A\x24\x79\x66\x68\x78\x5A\x4E\x45\x66\x66\x45\x45\x45\x24\x5A\x40\x71\x68\x5A\x68\x5A\x37\x66\x79\x78\x37\x78\x37\x68\x38\x38\x71\x48\x40\x23\x45\x3A\x3D\x37\x45\x27\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x37\x37\x78\x37\x33\x38\x45\x45\x71\x20\x5E\x3D\x2B\x3F\x2B\x2B\x79\x71\x45\x48\x40\x45\x45\x45\x45\x45\x71\x40\x40\x71\x38\x38\x79\x66\x38\x68\x48\x48\x45\x66\x37\x2B\x3A\x37\x3F\x3B\x3A\x2C\x27\x2C\x27\x78\x4D\x23\x48\x48\x48\x79\x2B\x3A\x3F\x79\x27\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3A\x78\x78\x24\x40\x4E\x4E\x4D\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5E\x3E\x3E\x3F\x3E\x3E\x3E\x3E\x3B\x3B\x3B\x3A\x3A\x3F\x3E\x3A\x2E\x2E\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2E\x45\x4D\x40\x45\x78\x5E\x33\x68\x33\x2B\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x24\x48\x45\x48\x78\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2B\x4E\x40\x2B\x66\x33\x78\x20\x20\n");
|
|
|
|
print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2B\x2C\x20\x3A\x20\x20\n");
|
|
|
|
} else {
|
|
|
|
print_srvconsole("Usage: amxx < command > [ argument ]\n");
|
|
|
|
print_srvconsole("Commands:\n");
|
|
|
|
print_srvconsole(" version - display amxx version info\n");
|
|
|
|
print_srvconsole(" gpl - print the license\n");
|
|
|
|
print_srvconsole(" plugins - list plugins currently loaded\n");
|
|
|
|
print_srvconsole(" modules - list modules currently loaded\n");
|
2007-06-21 15:26:02 +00:00
|
|
|
print_srvconsole(" cvars [ plugin ] - list cvars registered by plugins\n");
|
|
|
|
print_srvconsole(" cmds [ plugin ] - list commands registered by plugins\n");
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole(" pause < plugin > - pause a running plugin\n");
|
|
|
|
print_srvconsole(" unpause < plugin > - unpause a previously paused plugin\n");
|
|
|
|
}
|
|
|
|
}
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
void plugin_srvcmd()
|
|
|
|
{
|
2005-07-25 06:03:43 +00:00
|
|
|
const char* cmd = CMD_ARGV(0);
|
2004-04-22 08:07:22 +00:00
|
|
|
|
2005-07-25 06:03:43 +00:00
|
|
|
CmdMngr::iterator a = g_commands.srvcmdbegin();
|
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
while (a)
|
2005-07-25 06:03:43 +00:00
|
|
|
{
|
2005-09-10 20:09:14 +00:00
|
|
|
if ((*a).matchCommand(cmd) && (*a).getPlugin()->isExecutable((*a).getFunction()))
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2005-10-18 21:05:52 +00:00
|
|
|
cell ret = executeForwards((*a).getFunction(), static_cast<cell>(g_srvindex),
|
|
|
|
static_cast<cell>((*a).getFlags()), static_cast<cell>((*a).getId()));
|
2005-09-10 20:09:14 +00:00
|
|
|
if (ret) break;
|
2004-04-22 08:07:22 +00:00
|
|
|
}
|
2005-07-25 06:03:43 +00:00
|
|
|
++a;
|
|
|
|
}
|
2004-01-31 20:56:22 +00:00
|
|
|
}
|