From 4e8eff3e0406da83e0a2595de37ad69a496ec51b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 17 Aug 2005 16:41:38 +0000 Subject: [PATCH] Fixed bug at17021. --- amxmodx/CPlugin.cpp | 14 ++++---------- amxmodx/CPlugin.h | 2 +- amxmodx/amxmodx.cpp | 3 ++- amxmodx/srvcmd.cpp | 7 +++++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/amxmodx/CPlugin.cpp b/amxmodx/CPlugin.cpp index b1aae408..640cdcca 100755 --- a/amxmodx/CPlugin.cpp +++ b/amxmodx/CPlugin.cpp @@ -244,18 +244,12 @@ void CPluginMngr::CPlugin::Finalize() } } -void CPluginMngr::CPlugin::pauseFunction( int id ) { - if (isValid()){ - paused_fun |= (1<isValid()) { + if (plugin && plugin->isValid() && plugin->isPaused() ) + { plugin->unpausePlugin(); return 1; } diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 79707c84..870ea40b 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -97,12 +97,15 @@ void amx_command(){ CPluginMngr::CPlugin *plugin = g_plugins.findPlugin(sPlugin); - if ( plugin && plugin->isValid() ) + if ( plugin && plugin->isValid() && plugin->isPaused() ) { 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); } - else print_srvconsole("Couldn't find plugin matching \"%s\"\n",sPlugin); } else if (!strcmp(cmd,"cvars"))