core/systems/PluginSys.h
changeset 309 51e67f50830e
parent 298 07f6b2fe8468
child 315 5f48300aa103
     1.1 --- a/core/systems/PluginSys.h	Wed Jan 17 06:49:59 2007 +0000
     1.2 +++ b/core/systems/PluginSys.h	Wed Jan 17 18:22:00 2007 +0000
     1.3 @@ -12,6 +12,7 @@
     1.4  #include "PluginInfoDatabase.h"
     1.5  #include "sm_trie.h"
     1.6  #include "sourcemod.h"
     1.7 +#include <IRootConsoleMenu.h>
     1.8  
     1.9  using namespace SourceHook;
    1.10  
    1.11 @@ -150,7 +151,7 @@
    1.12  	/**
    1.13  	* Toggles debug mode in the plugin
    1.14  	*/
    1.15 -	bool ToggleDebugMode(bool debug);
    1.16 +	bool ToggleDebugMode(bool debug, char *error, size_t maxlength);
    1.17  
    1.18  	/**
    1.19  	* Returns true if a plugin is usable.
    1.20 @@ -186,7 +187,8 @@
    1.21  class CPluginManager : 
    1.22  	public IPluginManager,
    1.23  	public SMGlobalClass,
    1.24 -	public IHandleTypeDispatch
    1.25 +	public IHandleTypeDispatch,
    1.26 +	public IRootConsoleCommand
    1.27  {
    1.28  	friend class CPlugin;
    1.29  public:
    1.30 @@ -227,6 +229,8 @@
    1.31  	void OnSourceModShutdown();
    1.32  public: //IHandleTypeDispatch
    1.33  	void OnHandleDestroy(HandleType_t type, void *object);
    1.34 +public: //IRootConsoleCommand
    1.35 +	void OnRootConsoleCommand(const char *command, unsigned int argcount);
    1.36  public:
    1.37  	/**
    1.38  	 * Loads all plugins not yet loaded
    1.39 @@ -265,9 +269,14 @@
    1.40  	IPlugin *PluginFromHandle(Handle_t handle, HandleError *err);
    1.41  
    1.42  	/**
    1.43 -	* Finds a plugin based on its index. (starts on index 1)
    1.44 -	*/
    1.45 +	 * Finds a plugin based on its index. (starts on index 1)
    1.46 +	 */
    1.47  	CPlugin *GetPluginByOrder(int num);
    1.48 +
    1.49 +	/**
    1.50 +	 * Gets status text for a status code 
    1.51 +	 */
    1.52 +	const char *GetStatusText(PluginStatus status);
    1.53  private:
    1.54  	bool _LoadPlugin(CPlugin **pPlugin, const char *path, bool debug, PluginType type, char error[], size_t err_max);
    1.55