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);
|
2016-06-26 12:04:33 +00:00
|
|
|
const char* search = nullptr;
|
|
|
|
if (CMD_ARGC() > 2)
|
|
|
|
{
|
|
|
|
search = CMD_ARGV(2);
|
|
|
|
// Ignore empty search criteria
|
|
|
|
if (!(*search))
|
|
|
|
search = nullptr;
|
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
|
2005-09-10 20:09:14 +00:00
|
|
|
if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
|
|
|
|
{
|
|
|
|
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();
|
2015-01-29 20:44:53 +00:00
|
|
|
|
|
|
|
while (a)
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
2016-06-26 12:04:33 +00:00
|
|
|
if (!search || stristr((*a).getTitle(), search) != nullptr || stristr((*a).getName(), search) != nullptr || stristr((*a).getAuthor(), search) != nullptr)
|
|
|
|
{
|
|
|
|
++plugins;
|
|
|
|
if ((*a).isValid() && !(*a).isPaused())
|
|
|
|
++running;
|
2004-09-10 15:52:48 +00:00
|
|
|
|
2016-06-26 12:04:33 +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
|
|
|
{
|
2016-06-26 12:04:33 +00:00
|
|
|
if (!search || stristr((*a).getTitle(), search) != nullptr || stristr((*a).getName(), search) != nullptr || stristr((*a).getAuthor(), search) != nullptr)
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
2016-06-26 12:04:33 +00:00
|
|
|
num++;
|
|
|
|
if ((*a).getStatusCode() == ps_bad_load)
|
|
|
|
print_srvconsole("(%3d) Load fails: %s\n", num, (*a).getError());
|
|
|
|
else if ((*a).getStatusCode() == ps_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);
|
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2)
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
|
2015-01-29 20:44:53 +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())
|
|
|
|
{
|
2015-01-29 20:44:53 +00:00
|
|
|
print_srvconsole("Plugin \"%s\" is stopped and may not be paused.\n", plugin->getName());
|
2007-02-19 06:57:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-01-29 20:44:53 +00:00
|
|
|
print_srvconsole("Plugin \"%s\" is already paused.\n", plugin->getName());
|
2007-02-19 06:57:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
plugin->pausePlugin();
|
|
|
|
print_srvconsole("Paused plugin \"%s\"\n", plugin->getName());
|
|
|
|
}
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
2015-01-29 20:44:53 +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
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2)
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
|
2015-01-29 20:44:53 +00:00
|
|
|
if (plugin && plugin->isValid() && plugin->isPaused())
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
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);
|
2015-01-29 20:44:53 +00:00
|
|
|
}
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
else if (!strcmp(cmd, "cvars"))
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
2015-01-19 18:17:41 +00:00
|
|
|
g_CvarManager.OnConsoleCommand();
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
else if (!strcmp(cmd, "cmds"))
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
|
|
|
print_srvconsole("Registered commands:\n");
|
|
|
|
print_srvconsole(" %-24.23s %-16.15s %-8.7s %-16.15s\n", "name", "access", "type", "plugin");
|
2015-01-29 20:44:53 +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
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
print_srvconsole("%d commands\n", ammount);
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
2015-01-29 20:44:53 +00:00
|
|
|
else if (!strcmp(cmd, "version"))
|
2005-09-10 20:09:14 +00:00
|
|
|
{
|
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)
|
2015-02-12 09:46:20 +00:00
|
|
|
print_srvconsole("Built from: https://github.com/alliedmodders/amxmodx/commit/%s\n", AMXX_SHA);
|
|
|
|
print_srvconsole("Build ID: %s:%s\n", AMXX_LOCAL_REV, AMXX_SHA);
|
2014-12-08 00:41:52 +00:00
|
|
|
#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
|
|
|
|
2017-04-14 17:36:59 +00:00
|
|
|
for (auto module : g_modules)
|
2004-04-22 08:07:22 +00:00
|
|
|
{
|
2017-04-14 17:36:59 +00:00
|
|
|
if (module->getStatusValue() == MODULE_LOADED)
|
2005-09-10 20:09:14 +00:00
|
|
|
++running;
|
|
|
|
++modules;
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2017-04-14 17:36:59 +00:00
|
|
|
print_srvconsole(" [%2d] %-23.22s %-11.10s %-20.19s %-11.10s\n", modules, module->getName(), module->getVersion(), module->getAuthor(), module->getStatus());
|
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");
|
2015-01-29 20:44:53 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-09-10 20:09:14 +00:00
|
|
|
print_srvconsole("Usage: amxx < command > [ argument ]\n");
|
|
|
|
print_srvconsole("Commands:\n");
|
2015-01-27 00:49:57 +00:00
|
|
|
print_srvconsole(" version - display amxx version info\n");
|
|
|
|
print_srvconsole(" gpl - print the license\n");
|
2016-06-26 12:04:33 +00:00
|
|
|
print_srvconsole(" plugins [ criteria ] - list plugins currently loaded or ones matching given search criteria\n");
|
2015-01-27 00:49:57 +00:00
|
|
|
print_srvconsole(" modules - list modules currently loaded\n");
|
2015-01-29 20:44:53 +00:00
|
|
|
print_srvconsole(" cvars [ plugin ] [ index ] - list cvars handled by amxx or show information about a cvar if index is provided\n");
|
2015-01-27 00:49:57 +00:00
|
|
|
print_srvconsole(" cmds [ plugin ] - list commands registered by plugins\n");
|
|
|
|
print_srvconsole(" pause < plugin > - pause a running plugin\n");
|
|
|
|
print_srvconsole(" unpause < plugin > - unpause a previously paused plugin\n");
|
2005-09-10 20:09:14 +00:00
|
|
|
}
|
|
|
|
}
|
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);
|
2015-01-29 20:44:53 +00:00
|
|
|
|
2005-07-25 06:03:43 +00:00
|
|
|
CmdMngr::iterator a = g_commands.srvcmdbegin();
|
2015-01-29 20:44:53 +00:00
|
|
|
|
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),
|
2015-01-29 20:44:53 +00:00
|
|
|
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
|
|
|
}
|