Fixed am51050 - "amxx {pause,unpause" had misleading output

This commit is contained in:
Steve Dudenhoeffer 2007-02-19 06:57:26 +00:00
parent fff603635a
commit d45c3aeb96

View File

@ -82,13 +82,29 @@ void amx_command()
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);
@ -96,15 +112,22 @@ void amx_command()
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.", sPlugin);
print_srvconsole("Plugin %s can't be unpaused right now.\n", sPlugin);
}
}
else if (!strcmp(cmd, "cvars"))