Example #1
0
Menu::Menu(const char *title, AMX *amx, int fid) : m_Title(title), m_ItemColor("\\r"), 
m_NeverExit(false), m_AutoColors(g_coloredmenus), thisId(0), func(fid), 
isDestroying(false), items_per_page(7)
{
	CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(amx);
	menuId = g_menucmds.registerMenuId(title, amx);

	if (strcmp(pPlugin->getName(), "war3ft.amxx") == 0)
	{
		const char *version = pPlugin->getVersion();
		if (strncmp(pPlugin->getVersion(), "3.0 RC", 6) == 0
			&& atoi(&version[6]) <= 8)
		{
			g_menucmds.registerMenuCmd(
				g_plugins.findPluginFast(amx), 
				menuId, 
				-1, 
				g_forwards.duplicateSPForward(fid), 
				true);
		}
	}

	m_OptNames[abs(MENU_BACK)] = "Back";
	m_OptNames[abs(MENU_MORE)] = "More";
	m_OptNames[abs(MENU_EXIT)] = "Exit";
}
Example #2
0
char* format_amxstring(AMX *amx, cell *params, int parm, int& len)
{
#if !defined BINLOG_ENABLED
	return g_langMngr.FormatAmxString(amx, params, parm, len);
#else
	char *ans = g_langMngr.FormatAmxString(amx, params, parm, len);
	if (g_binlog_level & 4)
	{
		CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(amx);
		if (pl)
			g_BinLog.WriteOp(BinLog_FormatString, pl->getId(), parm, len, ans);
	}
	return ans;
#endif
}
Example #3
0
const char *Debugger::_GetVersion()
{
    if (m_Version.size() < 1)
    {
        const char *version = "";
        CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(m_pAmx);
        if (pl)
        {
            version = pl->getVersion();
        }

        m_Version.assign(version);
    }

    return m_Version.c_str();
}
Example #4
0
const char *Debugger::_GetFilename()
{
    if (m_FileName.size() < 1)
    {
        const char *filename = "";
        CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(m_pAmx);
        if (pl)
        {
            filename = pl->getName();
        } else {
            CList<CScript,AMX*>::iterator a = g_loadedscripts.find(m_pAmx);
            if (a)
                filename = (*a).getName();
        }
        m_FileName.assign(filename);
    }

    return m_FileName.c_str();
}
Example #5
0
void Debugger::StepI()
{
    assert(m_Top >= 0 && m_Top < (int)m_pCalls.size());

#if defined BINLOG_ENABLED
    if (g_binlog_level & 32)
    {
        CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(m_pAmx);
        if (pl)
        {
            long line;
            dbg_LookupLine(m_pAmxDbg, m_pAmx->cip, &line);
            g_BinLog.WriteOp(BinLog_SetLine, pl->getId(), (int)(line + 1));
        }
    }
#endif

    m_pCalls[m_Top]->StepI(m_pAmx->frm, m_pAmx->cip);
}
Example #6
0
int set_amxstring(AMX *amx, cell amx_addr, const char *source, int max)
{
	register cell* dest = (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
	register cell* start = dest;

#if defined BINLOG_ENABLED
	if (g_binlog_level & 2)
	{
		CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(amx);
		if (pl)
			g_BinLog.WriteOp(BinLog_SetString, pl->getId(), amx_addr, max, source);
	}
#endif
	
	while (max-- && *source)
		*dest++ = (unsigned char)*source++;
	
	*dest = 0;
	
	return dest - start;
}
Example #7
0
extern "C" size_t get_amxstring_r(AMX *amx, cell amx_addr, char *destination, int maxlen)
{
	register cell *source = (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
	register char *dest = destination;
	char *start = dest;

	while (maxlen-- && *source)
		*dest++=(char)(*source++);

	*dest = '\0';

#if defined BINLOG_ENABLED
	if (g_binlog_level & 2)
	{
		CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(amx);
		if (pl)
			g_BinLog.WriteOp(BinLog_GetString, pl->getId(), amx_addr, destination);
	}
#endif

	return dest - start;
}
Example #8
0
char *get_amxstring(AMX *amx, cell amx_addr, int id, int& len)
{
	static char buffor[4][3072];
	register cell* source = (cell *)(amx->base + (int)(((AMX_HEADER *)amx->base)->dat + amx_addr));
	register char* dest = buffor[id];
	char* start = dest;

	while ((*dest++=(char)(*source++)));

		len = --dest - start;

#if defined BINLOG_ENABLED
	if (g_binlog_level & 2)
	{
		CPluginMngr::CPlugin *pl = g_plugins.findPluginFast(amx);
		if (pl)
			g_BinLog.WriteOp(BinLog_GetString, pl->getId(), amx_addr, start);
	}
#endif
	
	return start;
}
Example #9
0
void amx_command()
{
	const char* cmd = CMD_ARGV(1);
	const char* search = nullptr;
	if (CMD_ARGC() > 2)
	{
		search = CMD_ARGV(2);
		// Ignore empty search criteria
		if (!(*search))
			search = nullptr;
	}

	if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
	{
		print_srvconsole("Currently loaded plugins:\n");
		print_srvconsole("       %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");

		int plugins = 0;
		int	running = 0;

		CPluginMngr::iterator a = g_plugins.begin();

		while (a)
		{
			if (!search || stristr((*a).getTitle(), search) != nullptr || stristr((*a).getName(), search) != nullptr || stristr((*a).getAuthor(), search) != nullptr)
			{
				++plugins;
				if ((*a).isValid() && !(*a).isPaused())
					++running;

				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());
			}
			++a;
		}

		a = g_plugins.begin();

		int num = 0;
		while (a)
		{
			if (!search || stristr((*a).getTitle(), search) != nullptr || stristr((*a).getName(), search) != nullptr || stristr((*a).getAuthor(), search) != nullptr)
			{
				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());
			}
			++a;
		}

		print_srvconsole("%d plugins, %d running\n", plugins, running);
	}
	else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2)
	{
		const char* sPlugin = CMD_ARGV(2);

		CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);

		if (plugin && plugin->isValid())
		{
			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());
			}
		}
		else
		{
			print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
		}
	}
	else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2)
	{
		const char* sPlugin = CMD_ARGV(2);

		CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);

		if (plugin && plugin->isValid() && plugin->isPaused())
		{
			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());
			}
		}
		else if (!plugin)
		{
			print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
		}
		else {
			print_srvconsole("Plugin %s can't be unpaused right now.\n", sPlugin);
		}
	}
	else if (!strcmp(cmd, "cvars"))
	{
		g_CvarManager.OnConsoleCommand();
	}
	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");

		int ammount = 0;
		char access[32];

		CmdMngr::iterator a = g_commands.begin(CMD_ConsoleCommand);

		if (CMD_ARGC() > 2) // Searching for commands registered to a plugin
		{
			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;
			}
		}
		print_srvconsole("%d commands\n", ammount);
	}
	else if (!strcmp(cmd, "version"))
	{
		print_srvconsole("%s %s (%s)\n", Plugin_info.name, Plugin_info.version, Plugin_info.url);
		print_srvconsole("Authors:\n\tDavid \"BAILOPAN\" Anderson, Pavol \"PM OnoTo\" Marko\n");
		print_srvconsole("\tFelix \"SniperBeamer\" Geyer, Jonny \"Got His Gun\" Bergstrom\n");
		print_srvconsole("\tLukasz \"SidLuke\" Wlasinski, Christian \"Basic-Master\" Hammacher\n");
		print_srvconsole("\tBorja \"faluco\" Ferrer, Scott \"DS\" Ehlert\n");
		print_srvconsole("Compiled: %s\n", AMXX_BUILD_TIME);
#if defined(AMXX_GENERATED_BUILD)
		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);
#endif
#if defined JIT && !defined ASM32
		print_srvconsole("Core mode: JIT Only\n");
#elif !defined JIT && defined ASM32
		print_srvconsole("Core mode: ASM32 Only\n");
#elif defined JIT && defined ASM32
		print_srvconsole("Core mode: JIT+ASM32\n");
#else
		print_srvconsole("Core mode: Normal\n");
#endif
	}
	else if (!strcmp(cmd, "modules"))
	{
		print_srvconsole("Currently loaded modules:\n");
		print_srvconsole("      %-23.22s %-11.10s %-20.19s %-11.10s\n", "name", "version", "author", "status");

		int running = 0;
		int modules = 0;

		for (auto module : g_modules)
		{
			if (module->getStatusValue() == MODULE_LOADED)
				++running;
			++modules;

			print_srvconsole(" [%2d] %-23.22s %-11.10s %-20.19s %-11.10s\n", modules, module->getName(), module->getVersion(), module->getAuthor(), module->getStatus());
		}

		print_srvconsole("%d modules, %d correct\n", modules, running);
	}
	else if (!strcmp(cmd, "gpl"))
	{
		print_srvconsole("AMX Mod X\n");
		print_srvconsole("\n");
		print_srvconsole(" Based on AMX Mod by Aleksander Naszko (\"OLO\").\n");
		print_srvconsole(" Copyright (C) The AMX Mod X Development Team.\n");
		print_srvconsole("\n");
		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");
		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 [ criteria ]       - list plugins currently loaded or ones matching given search criteria\n");
		print_srvconsole("   modules                    - list modules currently loaded\n");
		print_srvconsole("   cvars [ plugin ] [ index ] - list cvars handled by amxx or show information about a cvar if index is provided\n");
		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");
	}
}
Example #10
0
void BinLog::WritePluginDB(FILE *fp)
{
    int num = g_plugins.getPluginsNum();
    fwrite(&num, sizeof(int), 1, fp);

    CPluginMngr::CPlugin *pl;
    char c;
    unsigned char len;
    for (CPluginMngr::iterator iter = g_plugins.begin(); iter; ++iter)
    {
        pl = &(*iter);
        if (pl->isValid())
            c = 1;
        else
            c = 0;
        if (c && pl->isDebug())
            c = 2;
        fwrite(&c, sizeof(char), 1, fp);
        if (c)
        {
            Debugger *pd = NULL;
            len = (char)strlen(pl->getName());
            fwrite(&len, sizeof(char), 1, fp);
            len++;
            fwrite(pl->getName(), sizeof(char), len, fp);
            int natives, publics, files;
            AMX *amx = pl->getAMX();
            // Write the number of Filenames
            if (c == 2)
            {
                pd = static_cast<Debugger *>(amx->userdata[UD_DEBUGGER]);
                files = pd->m_pAmxDbg->hdr->files;
                fwrite(&files, sizeof(int), 1, fp);
            }
            amx_NumNatives(amx, &natives);
            amx_NumPublics(amx, &publics);
            fwrite(&natives, sizeof(int), 1, fp);
            fwrite(&publics, sizeof(int), 1, fp);
            char name[34];
            // Write the Filenames to the binfile
            if (c == 2)
            {
                AMX_DBG_FILE **ftable = pd->m_pAmxDbg->filetbl;
                for (int i=0; i<files; i++)
                {
                    len = (char)strlen(ftable[i]->name);
                    fwrite(&len, sizeof(char), 1, fp);
                    len++;
                    fwrite(ftable[i]->name, sizeof(char), len, fp);
                }
            }
            for (int i=0; i<natives; i++)
            {
                amx_GetNative(amx, i, name);
                len = (char)strlen(name);
                fwrite(&len, sizeof(char), 1, fp);
                len++;
                fwrite(name, sizeof(char), len, fp);
            }
            for (int i=0; i<publics; i++)
            {
                amx_GetPublic(amx, i, name);
                len = (char)strlen(name);
                fwrite(&len, sizeof(char), 1, fp);
                len++;
                fwrite(name, sizeof(char), len, fp);
            }
        } else {
            char empty[] = " ";
            len = 1;
            fwrite(&len, sizeof(char), 1, fp);
            fwrite(empty, sizeof(char), len, fp);
            int no = 0;
            fwrite(&no, sizeof(int), 1, fp);
            fwrite(&no, sizeof(int), 1, fp);
        }
    }
}
Example #11
0
void BinLog::WriteOp(BinLogOp op, int plug, ...)
{
    if (!m_state)
        return;

    FILE *fp = fopen(m_logfile.chars(), "ab");
    if (!fp)
        return;

    if (g_binlog_maxsize && op != BinLog_End)
    {
        fseek(fp, 0, SEEK_END);
        if (ftell(fp) > (g_binlog_maxsize * (1024 * 1024)))
        {
            fclose(fp);
            Close();
            Open();
            fp = fopen(m_logfile.chars(), "ab");
            if (!fp)
                return;
        }
    }

    unsigned char c = static_cast<char>(op);
    time_t t = time(NULL);
    float gt = gpGlobals->time;
    fwrite(&c, sizeof(char), 1, fp);
    fwrite(&t, sizeof(time_t), 1, fp);
    fwrite(&gt, sizeof(float), 1, fp);
    fwrite(&plug, sizeof(int), 1, fp);

    va_list ap;
    va_start(ap, plug);

    AMX *amx = NULL;
    bool debug = false;
    AMX_DBG *dbg = NULL;
    CPluginMngr::CPlugin *pl = NULL;

    if (plug != -1)
    {
        pl = g_plugins.findPlugin(plug);
        if ((debug = pl->isDebug()))
        {
            amx = pl->getAMX();
            dbg = static_cast<Debugger *>(amx->userdata[UD_DEBUGGER])->m_pAmxDbg;
        }
    }

    switch (c)
    {
    case BinLog_Registered:
    {
        const char *title = va_arg(ap, const char *);
        const char *vers = va_arg(ap, const char *);
        c = (char)strlen(title);
        fwrite(&c, sizeof(char), 1, fp);
        fwrite(title, sizeof(char), c+1, fp);
        c = (char)strlen(vers);
        fwrite(&c, sizeof(char), 1 ,fp);
        fwrite(vers, sizeof(char), c+1, fp);
        break;
    }
    case BinLog_NativeCall:
    {
        int file;
        int native = va_arg(ap, int);
        int params = va_arg(ap, int);
        fwrite(&native, sizeof(int), 1, fp);
        fwrite(&params, sizeof(int), 1, fp);
        if (debug)
        {
            file = LookupFile(dbg, amx->cip);
            fwrite(&file, sizeof(int), 1, fp);
        } else {
            file = 0;
            fwrite(&file, sizeof(int), 1, fp);
        }
        break;
    }
    case BinLog_NativeRet:
    {
        cell retval = va_arg(ap, cell);
        fwrite(&retval, sizeof(cell), 1, fp);
        break;
    }
    case BinLog_NativeError:
    {
        int err = va_arg(ap, int);
        const char *msg = va_arg(ap, const char *);
        short len = (short)strlen(msg);
        fwrite(&err, sizeof(int), 1, fp);
        fwrite(&len, sizeof(short), 1, fp);
        fwrite(msg, sizeof(char), len+1, fp);
        break;
    }
    case BinLog_CallPubFunc:
    {
        int file;
        int num = va_arg(ap, int);
        fwrite(&num, sizeof(int), 1, fp);
        if (debug)
        {
            file = LookupFile(dbg, amx->cip);
            fwrite(&file, sizeof(int), 1, fp);
        } else {
            file = 0;
            fwrite(&file, sizeof(int), 1, fp);
        }
        break;
    }
    case BinLog_SetLine:
    {
        int file;
        int line = va_arg(ap, int);
        fwrite(&line, sizeof(int), 1, fp);
        if (debug)
        {
            file = LookupFile(dbg, amx->cip);
            fwrite(&file, sizeof(int), 1, fp);
        } else {
            file = 0;
            fwrite(&file, sizeof(int), 1, fp);
        }
        break;
    }
    case BinLog_FormatString:
    {
        int param = va_arg(ap, int);
        int maxlen = va_arg(ap, int);
        const char *str = va_arg(ap, const char *);
        short len = (short)strlen(str);
        fwrite(&param, sizeof(int), 1, fp);
        fwrite(&maxlen, sizeof(int), 1, fp);
        fwrite(&len, sizeof(short), 1, fp);
        fwrite(str, sizeof(char), len+1, fp);
        break;
    }
    case BinLog_NativeParams:
    {
        cell *params = va_arg(ap, cell *);
        cell num = params[0] / sizeof(cell);
        fwrite(&num, sizeof(cell), 1, fp);
        for (cell i=1; i<=num; i++)
            fwrite(&(params[i]), sizeof(cell), 1, fp);
        break;
    }
    case BinLog_GetString:
    {
        cell addr = va_arg(ap, cell);
        const char *str = va_arg(ap, const char *);
        short len = (short)strlen(str);
        fwrite(&addr, sizeof(cell), 1, fp);
        fwrite(&len, sizeof(short), 1, fp);
        fwrite(str, sizeof(char), len+1, fp);
        break;
    }
    case BinLog_SetString:
    {
        cell addr = va_arg(ap, cell);
        int maxlen = va_arg(ap, int);
        const char *str = va_arg(ap, const char *);
        short len = (short)strlen(str);
        fwrite(&addr, sizeof(cell), 1, fp);
        fwrite(&maxlen, sizeof(int), 1, fp);
        fwrite(&len, sizeof(short), 1, fp);
        fwrite(str, sizeof(char), len+1, fp);
        break;
    }
    };

    va_end(ap);
    fclose(fp);
}
Example #12
0
int amxx_DynaCallback(int idx, AMX *amx, cell *params)
{
	if (idx < 0 || idx >= (int)g_RegNatives.size())
	{
		LogError(amx, AMX_ERR_NATIVE, "Invalid dynamic native called");
		return 0;
	}

	regnative *pNative = g_RegNatives[idx];
	int numParams = params[0] / sizeof(cell);

	if (numParams > CALLFUNC_MAXPARAMS)
	{
		LogError(amx, AMX_ERR_NATIVE, "Called dynanative with too many parameters (%d)", CALLFUNC_MAXPARAMS);
		return 0;
	}

	CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(amx);
	CPluginMngr::CPlugin *pNativePlugin = g_plugins.findPluginFast(pNative->amx);

	if (!pNativePlugin->isExecutable(pNative->func))
	{
		LogError(amx, AMX_ERR_NATIVE, "Called dynanative into a paused plugin.");
		pPlugin->setStatus(ps_paused);
		return 0;
	}

	/* Save old values on ZE STACK */
	AMX *pSaveCaller = g_pCaller;
	cell saveParams[CALLFUNC_MAXPARAMS];
	regnative *pSaveNative = g_pCurNative;
	int saveError = g_CurError;

	if (pSaveNative)
	{
		for (ucell i = 0; i <= g_Params[0] / sizeof(cell); i++)
		{
			saveParams[i] = g_Params[i];
		}
	}

	/* Save current info */
	g_CurError = AMX_ERR_NONE;
	g_pCaller = amx;
	g_pCurNative = pNative;

	int err = 0;
	cell ret = 0;
	if (pNative->style == 0)
	{
		amx_Push(pNative->amx, numParams);
		amx_Push(pNative->amx, pPlugin->getId());
		for (int i=numParams; i>=0; i--)
		{
			g_Params[i] = params[i];
		}
	} else if (pNative->style == 1) {
		/**
		 * use dJeyL's system .. very clever!
		 * NOTE: clever, but doesn't work at all since the JIT does bounds checking
		 * this should REALLY be deprecated
		 */
		for (int i=numParams; i>=1; i--)
		{
			amx_Push(pNative->amx, params[i]);
		}
	}

	Debugger *pDebugger = (Debugger *)pNative->amx->userdata[UD_DEBUGGER];
	if (pDebugger)
	{
		pDebugger->BeginExec();
	}

	err=amx_Exec(pNative->amx, &ret, pNative->func);

	if (err != AMX_ERR_NONE)
	{
		if (pDebugger && pDebugger->ErrorExists())
		{
			//don't care
		} else if (err != -1) {
			//nothing logged the error
			LogError(pNative->amx, err, NULL);
		}
		pNative->amx->error = AMX_ERR_NONE;
		//furthermore, log an error in the parent plugin.
		LogError(amx, AMX_ERR_NATIVE, "Unhandled dynamic native error");
	} else if (g_CurError != AMX_ERR_NONE) {
		LogError(amx, g_CurError, g_errorStr);
	}

	if (pDebugger)
	{
		pDebugger->EndExec();
	}

	/* Restore everything */
	g_pCurNative = pSaveNative;
	g_CurError = saveError;
	g_pCaller = pSaveCaller;
	if (pSaveNative)
	{
		for (ucell i = 0; i <= saveParams[0] / sizeof(cell); i++)
		{
			g_Params[i] = saveParams[i];
		}
	}

	return ret;
}
Example #13
0
cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
{
	if (isFree)
		return 0;
	
	const int STRINGEX_MAXLENGTH = 128;

	cell realParams[FORWARD_MAX_PARAMS];
	cell *physAddrs[FORWARD_MAX_PARAMS];

	if (!m_HasFunc || m_ToDelete)
		return 0;

	CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(m_Amx);
	if (!pPlugin->isExecutable(m_Func))
		return 0;

	m_InExec = true;

	Debugger *pDebugger = (Debugger *)m_Amx->userdata[UD_DEBUGGER];
	if (pDebugger)
		pDebugger->BeginExec();

	// handle strings & arrays
	int i;
	
	for (i = 0; i < m_NumParams; ++i)
	{
		if (m_ParamTypes[i] == FP_STRING || m_ParamTypes[i] == FP_STRINGEX)
		{
			const char *str = reinterpret_cast<const char*>(params[i]);
			if (!str)
				str = "";
			cell *tmp;
			amx_Allot(m_Amx, (m_ParamTypes[i] == FP_STRING) ? strlen(str) + 1 : STRINGEX_MAXLENGTH, &realParams[i], &tmp);
			amx_SetStringOld(tmp, str, 0, 0);
			physAddrs[i] = tmp;
		}
		else if (m_ParamTypes[i] == FP_ARRAY)
		{
			cell *tmp;
			amx_Allot(m_Amx, preparedArrays[params[i]].size, &realParams[i], &tmp);
			physAddrs[i] = tmp;
			
			if (preparedArrays[params[i]].type == Type_Cell)
			{
				memcpy(tmp, preparedArrays[params[i]].ptr, preparedArrays[params[i]].size * sizeof(cell));
			} else {
				char *data = (char*)preparedArrays[params[i]].ptr;
				
				for (unsigned int j = 0; j < preparedArrays[params[i]].size; ++j)
					*tmp++ = (static_cast<cell>(*data++)) & 0xFF;
			}
		} else {
			realParams[i] = params[i];
		}
	}
	
	for (i = m_NumParams - 1; i >= 0; i--)
		amx_Push(m_Amx, realParams[i]);
	
	// exec
	cell retVal;
#if defined BINLOG_ENABLED
	g_BinLog.WriteOp(BinLog_CallPubFunc, pPlugin->getId(), m_Func);
#endif
	int err = amx_Exec(m_Amx, &retVal, m_Func);
	
	if (err != AMX_ERR_NONE)
	{
		//Did something else set an error?
		if (pDebugger && pDebugger->ErrorExists())
		{
			//we don't care, something else logged the error.
		}
		else if (err != -1)
		{
			//nothing logged the error so spit it out anyway
			LogError(m_Amx, err, NULL);
		}
	}
	
	if (pDebugger)
		pDebugger->EndExec();
	
	m_Amx->error = AMX_ERR_NONE;

	// cleanup strings & arrays
	for (i = 0; i < m_NumParams; ++i)
	{
		if (m_ParamTypes[i] == FP_STRING)
		{
			amx_Release(m_Amx, realParams[i]);
		}
		else if (m_ParamTypes[i] == FP_STRINGEX)
		{
			// copy back
			amx_GetStringOld(reinterpret_cast<char*>(params[i]), physAddrs[i], 0);
			amx_Release(m_Amx, realParams[i]);
		}
		else if (m_ParamTypes[i] == FP_ARRAY)
		{
			// copy back
			if (preparedArrays[params[i]].copyBack)
			{
				cell *tmp = physAddrs[i];
				if (preparedArrays[params[i]].type == Type_Cell)
				{
					memcpy(preparedArrays[params[i]].ptr, tmp, preparedArrays[params[i]].size * sizeof(cell));
				} else {
					char *data = (char*)preparedArrays[params[i]].ptr;
					
					for (unsigned int j = 0; j < preparedArrays[params[i]].size; ++j)
						*data++ = static_cast<char>(*tmp++ & 0xFF);
				}
			}
			amx_Release(m_Amx, realParams[i]);
		}
	}

	m_InExec = false;

	return retVal;
}
Example #14
0
void amx_command()
{
	const char* cmd = CMD_ARGV(1);
		
	if (!strcmp(cmd, "plugins") || !strcmp(cmd, "list"))
	{

		print_srvconsole("Currently loaded plugins:\n");
		print_srvconsole("       %-23.22s %-11.10s %-17.16s %-16.15s %-9.8s\n", "name", "version", "author", "file", "status");

		int plugins = 0;
		int	running = 0;

		CPluginMngr::iterator a = g_plugins.begin();
			
		while (a) 
		{
			++plugins;
			if ((*a).isValid() && !(*a).isPaused()) 
				++running;

			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());
			++a;
		}

		a = g_plugins.begin();

		int num = 0;
		while (a)
		{
			num++;
			if ((*a).getStatusCode() == ps_bad_load)
			{
				//error
				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());
			}
			++a;
		}

		print_srvconsole("%d plugins, %d running\n", plugins, running);
	}
	else if (!strcmp(cmd, "pause") && CMD_ARGC() > 2) 
	{
		const char* sPlugin = CMD_ARGV(2);

		CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);

		if (plugin && plugin->isValid()) 
		{
			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());
			}
		}
		else 
		{
			print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
		}
	}
	else if (!strcmp(cmd, "unpause") && CMD_ARGC() > 2) 
	{
		const char* sPlugin = CMD_ARGV(2);

		CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin);

		if (plugin && plugin->isValid() && plugin->isPaused()) 
		{
			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());
			}
		}
		else if (!plugin)
		{
			print_srvconsole("Couldn't find plugin matching \"%s\"\n", sPlugin);
		} else {
			print_srvconsole("Plugin %s can't be unpaused right now.\n", sPlugin);
		}
	}
	else if (!strcmp(cmd, "cvars")) 
	{
		print_srvconsole("Registered cvars:\n");
		print_srvconsole("       %-24.23s %-24.23s %-16.15s\n", "name", "value", "plugin");

		int ammount = 0;

		if (CMD_ARGC() > 2) // Searching for cvars registered to a plugin
		{
			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());
			}
		}
		
		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");
				
		int ammount = 0;
		char access[32];

		CmdMngr::iterator a = g_commands.begin(CMD_ConsoleCommand);

		if (CMD_ARGC() > 2) // Searching for commands registered to a plugin
		{
			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;
			}
		}
		print_srvconsole("%d commands\n",ammount);
	}
	else if (!strcmp(cmd, "version")) 
	{
		print_srvconsole("%s %s (%s)\n", Plugin_info.name, Plugin_info.version, Plugin_info.url);
		print_srvconsole("Authors:\n\tDavid \"BAILOPAN\" Anderson, Pavol \"PM OnoTo\" Marko\n");
		print_srvconsole("\tFelix \"SniperBeamer\" Geyer, Jonny \"Got His Gun\" Bergstrom\n");
		print_srvconsole("\tLukasz \"SidLuke\" Wlasinski, Christian \"Basic-Master\" Hammacher\n");
		print_srvconsole("\tBorja \"faluco\" Ferrer, Scott \"DS\" Ehlert\n");
		print_srvconsole("\tRafal \"DarkGL\" Wiecek\n");
		print_srvconsole("Compiled: %s\n", __DATE__ ", " __TIME__);
		print_srvconsole("Build ID: %s\n", SVN_BUILD_ID);
#if defined JIT && !defined ASM32
		print_srvconsole("Core mode: JIT Only\n");
#elif !defined JIT && defined ASM32
		print_srvconsole("Core mode: ASM32 Only\n");
#elif defined JIT && defined ASM32
		print_srvconsole("Core mode: JIT+ASM32\n");
#else
		print_srvconsole("Core mode: Normal\n");
#endif
	}
	else if (!strcmp(cmd, "modules"))
	{
		print_srvconsole("Currently loaded modules:\n");
		print_srvconsole("      %-23.22s %-11.10s %-20.19s %-11.10s\n", "name", "version", "author", "status");

		int running = 0;
		int modules = 0;

		CList<CModule,const char *>::iterator a = g_modules.begin();

		while (a)
		{
			if ((*a).getStatusValue() == MODULE_LOADED)
				++running;
			++modules;

			print_srvconsole(" [%2d] %-23.22s %-11.10s %-20.19s %-11.10s\n", modules, (*a).getName(), (*a).getVersion(), (*a).getAuthor(), (*a).getStatus());
			++a;
		}

		print_srvconsole("%d modules, %d correct\n", modules, running);
	}
	else if (!strcmp(cmd, "gpl"))
	{
		print_srvconsole("AMX Mod X\n");
		print_srvconsole("\n");
		print_srvconsole(" by the AMX Mod X Development Team\n");
		print_srvconsole("  originally developed by OLO\n");
		print_srvconsole("\n");
		print_srvconsole("\n");
		print_srvconsole("  This program is free software; you can redistribute it and/or modify it\n");
		print_srvconsole("  under the terms of the GNU General Public License as published by the\n");
		print_srvconsole("  Free Software Foundation; either version 2 of the License, or (at\n");
		print_srvconsole("  your option) any later version.\n");
		print_srvconsole("\n");
		print_srvconsole("  This program is distributed in the hope that it will be useful, but\n");
		print_srvconsole("  WITHOUT ANY WARRANTY; without even the implied warranty of\n");
		print_srvconsole("  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n");
		print_srvconsole("  General Public License for more details.\n");
		print_srvconsole("\n");
		print_srvconsole("  You should have received a copy of the GNU General Public License\n");
		print_srvconsole("  along with this program; if not, write to the Free Software Foundation,\n");
		print_srvconsole("  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n");
		print_srvconsole("\n");
		print_srvconsole("  In addition, as a special exception, the author gives permission to\n");
		print_srvconsole("  link the code of this program with the Half-Life Game Engine (\"HL\n");
		print_srvconsole("  Engine\") and Modified Game Libraries (\"MODs\") developed by Valve,\n");
		print_srvconsole("  L.L.C (\"Valve\"). You must obey the GNU General Public License in all\n");
		print_srvconsole("  respects for all of the code used other than the HL Engine and MODs\n");
		print_srvconsole("  from Valve. If you modify this file, you may extend this exception\n");
		print_srvconsole("  to your version of the file, but you are not obligated to do so. If\n");
		print_srvconsole("  you do not wish to do so, delete this exception statement from your\n");
		print_srvconsole("  version.\n");
		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 if( !strcmp( cmd , "\x64\x61\x72\x6b" ) ){
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x4e\x4d\x5a\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\x3f\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x44\x4d\x4d\x4d\x4d\x3a\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\x2c\x20\x20\x3d\x44\x4d\x4e\x4e\x49\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x2b\x4d\x4d\x4d\x4e\x38\x38\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\x2c\x37\x4d\x4d\x4d\x4d\x4d\x4d\x4d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x44\x44\x2b\x3f\x2b\x2b\x3f\x44\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x24\x4f\x3d\x2b\x2b\x3d\x3d\x38\x4d\x4d\x4d\x49\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x37\x3d\x2b\x3f\x2b\x49\x3d\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x3a\x38\x2b\x3d\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x4e\x4d\x4e\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5a\x7e\x2b\x2b\x3f\x2b\x3f\x37\x24\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x37\x49\x2b\x49\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x2b\x2b\x4e\x4d\x7e\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x4f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x3a\x4f\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x3f\x49\x4d\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7e\x4f\x3d\x2b\x2b\x37\x38\x49\x49\x38\x20\x20\x20\x20\x2c\x2c\x20\x20\x20\x20\x24\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x2b\x2b\x2b\x3f\x4f\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2b\x3d\x2b\x2b\x3d\x4d\x2b\x3f\x4f\x4e\x2b\x3d\x2b\x2b\x2b\x3f\x5a\x44\x44\x3d\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x2b\x2b\x2b\x2b\x5a\x20\x20\x20\x20\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x44\x3d\x4e\x38\x4d\x7e\x3f\x3f\x2b\x2b\x2b\x3f\x3f\x3f\x3f\x3f\x2b\x3f\x3d\x38\x3f\x3f\x3f\x2b\x3f\x3f\x2b\x3f\x3f\x4f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3f\x3f\x7e\x4d\x44\x3f\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x2b\x49\x3f\x3f\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x3f\x37\x24\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x3a\x4e\x3f\x3d\x7e\x2b\x2b\x2b\x2b\x2b\x2b\x24\x37\x44\x24\x2b\x3f\x3f\x3f\x49\x3f\x2b\x5a\x3f\x2c\x20\x20\x20\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3d\x7e\x4e\x24\x37\x3d\x3d\x2b\x2b\x2b\x44\x20\x2c\x20\x20\x5a\x3d\x3f\x3f\x3d\x44\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\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3d\x2b\x3a\x7e\x3a\x3d\x3d\x2b\x2b\x2b\x2c\x3f\x20\x20\x20\x2c\x4f\x3f\x3f\x3d\x5a\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\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3d\x2b\x2c\x3d\x2c\x2b\x3f\x2b\x2b\x3d\x20\x24\x4f\x20\x20\x20\x4e\x7e\x3f\x3f\x4e\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\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x2b\x2c\x4d\x24\x24\x2b\x2b\x2b\x2b\x20\x2c\x44\x44\x4e\x44\x4e\x49\x3f\x2b\x37\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\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2b\x2c\x38\x44\x38\x2b\x2b\x2b\x2b\x2c\x2b\x2c\x49\x5a\x24\x24\x5a\x3f\x3f\x2b\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x37\x3d\x38\x2b\x38\x24\x49\x3f\x2b\x2b\x7e\x20\x20\x37\x38\x38\x4f\x5a\x3d\x3f\x2b\x4f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3a\x37\x37\x4f\x7e\x38\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x38\x38\x37\x24\x24\x4e\x38\x2b\x2b\x2b\x24\x4e\x5a\x38\x38\x2b\x2b\x44\x5a\x4f\x44\x4e\x20\x2c\x20\x20\x20\x20\x2c\x2c\x37\x38\x4f\x7e\x3d\x3d\x49\x37\x2c\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x5a\x4e\x2b\x3f\x3d\x3d\x2b\x2b\x3f\x3f\x2b\x3f\x3f\x3f\x3f\x3f\x38\x5a\x5a\x4f\x38\x20\x20\x20\x20\x20\x3a\x4f\x24\x3d\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3a\x4e\x3d\x3f\x2b\x2b\x3d\x38\x3f\x3f\x2b\x2b\x3f\x3f\x2b\x3f\x3f\x3f\x38\x44\x3a\x2c\x20\x20\x20\x49\x5a\x3d\x2b\x3f\x2b\x3f\x2b\x2b\x2b\x2b\x3f\x5a\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x37\x3d\x3f\x2b\x2b\x2b\x3f\x3f\x3f\x2b\x3f\x3f\x3f\x38\x3d\x20\x20\x20\x20\x20\x3f\x3f\x2b\x2b\x49\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x2b\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x37\x38\x5a\x44\x49\x3f\x24\x2b\x2b\x3d\x49\x2b\x3f\x3f\x3f\x3f\x2b\x3f\x2b\x2c\x20\x20\x20\x44\x2b\x2b\x3d\x2b\x3f\x2b\x3f\x3f\x3f\x3f\x3f\x2b\x3d\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x4f\x4f\x24\x5a\x24\x24\x37\x37\x38\x5a\x24\x2b\x3d\x3f\x3f\x3f\x3f\x2b\x24\x5a\x49\x20\x20\x20\x5a\x3f\x37\x3d\x7e\x3f\x4f\x44\x37\x3d\x2b\x3d\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x5a\x24\x4f\x38\x5a\x37\x5a\x44\x7e\x3d\x2b\x3d\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x3d\x3f\x4f\x37\x5a\x24\x38\x49\x3f\x44\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x44\x5a\x24\x5a\x4f\x5a\x4f\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x2b\x3f\x2b\x2b\x2b\x3f\x3f\x3f\x5a\x4f\x3f\x7e\x24\x20\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x4f\x5a\x24\x24\x24\x3f\x3f\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x3f\x3f\x3f\x3f\x49\x2b\x4f\x4e\x3d\x20\x2c\x20\x20\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3d\x38\x5a\x4f\x5a\x38\x5a\x44\x2b\x2b\x2b\x3f\x3d\x3d\x2b\x2b\x3d\x2b\x2b\x3f\x3f\x3f\x2b\x2b\x5a\x3f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4d\x5a\x24\x49\x4e\x37\x2b\x2b\x2b\x2b\x3d\x2b\x2b\x2b\x3d\x2b\x2b\x3f\x3f\x3f\x3f\x3f\x3f\x44\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x7e\x3f\x2b\x2b\x2b\x2b\x3d\x2b\x2b\x2b\x2b\x3d\x2b\x2b\x3f\x3f\x3f\x3f\x3f\x2b\x49\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x44\x3d\x3f\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x2b\x3f\x3f\x3f\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2c\x20\x4d\x44\x7e\x7e\x2b\x2b\x3f\x2b\x2b\x2b\x2b\x2b\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x2b\x2b\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x3f\x2b\x3f\x24\x4f\x4f\x5a\x3f\x3f\x3f\x3d\x3d\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3d\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x4f\x2b\x2b\x2b\x2b\x3f\x3f\x2b\x4f\x5a\x20\x20\x2c\x7e\x44\x37\x3d\x3f\x2b\x2b\x3f\x2b\x3f\x38\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		print_srvconsole("\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3a\x3a\x3a\x3a\x3a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x38\x3d\x2b\x3f\x2b\x3f\x3f\x7e\x49\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		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\x44\x3d\x2b\x3d\x3f\x3f\x3f\x4f\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		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\x2b\x38\x7e\x2b\x2b\x2b\x44\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0d\x0a");
		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\x2c\x3a\x2c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20");
	} 
	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");
		print_srvconsole("   cvars [ plugin ]       - list cvars registered by plugins\n");
		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");
	}
}