plugins/include/console.inc
author Phong Dang <teame06@gmail.com>
Sun Jul 29 00:26:18 2007 +0000 (2007-07-29)
changeset 1200 623603b49096
parent 1120 deea3b1a62aa
child 1301 a9e6cd2953f2
permissions -rw-r--r--
Fixed AskPluginLoad would still allowed plugin to load even if it returned false.
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  *  This file is part of the SourceMod/SourcePawn SDK.  This file may only be used 
     8  * or modified under the Terms and Conditions of its License Agreement, which is found 
     9  * in LICENSE.txt.  The Terms and Conditions for making SourceMod extensions/plugins 
    10  * may change at any time.  To view the latest information, see:
    11  *   http://www.sourcemod.net/license.php
    12  *
    13  * Version: $Id$
    14  */
    15  
    16 #if defined _console_included
    17  #endinput
    18 #endif
    19 #define _console_included
    20 
    21 /**
    22  * Console variable bound values used with Get/SetConVarBounds()
    23  */
    24 enum ConVarBounds
    25 {
    26 	ConVarBound_Upper = 0,
    27 	ConVarBound_Lower
    28 };
    29 
    30 /**
    31  * Console variable query helper values.
    32  */
    33 enum QueryCookie
    34 {
    35 	QUERYCOOKIE_FAILED = 0,
    36 };
    37 
    38 /**
    39  * Reply sources for commands.
    40  */
    41 enum ReplySource
    42 {
    43 	SM_REPLY_TO_CONSOLE = 0,
    44 	SM_REPLY_TO_CHAT = 1,
    45 };
    46 
    47 /**
    48  * Console variable query result values.
    49  */
    50 enum ConVarQueryResult
    51 {
    52 	ConVarQuery_Okay = 0,				/**< Retrieval of client convar value was successful. */
    53 	ConVarQuery_NotFound,				/**< Client convar was not found. */
    54 	ConVarQuery_NotValid,				/**< A console command with the same name was found, but there is no convar. */
    55 	ConVarQuery_Protected				/**< Client convar was found, but it is protected. The server cannot retrieve its value. */
    56 };
    57 
    58 /**
    59  * @section Flags for console commands and console variables.  The descriptions 
    60  * for each constant come directly from the Source SDK.
    61  */
    62 #define FCVAR_NONE				0		/**< The default, no flags at all */
    63 #define FCVAR_UNREGISTERED		(1<<0)	/**< If this is set, don't add to linked list, etc. */
    64 #define FCVAR_LAUNCHER			(1<<1)	/**< Defined by launcher. */
    65 #define FCVAR_GAMEDLL			(1<<2)	/**< Defined by the game DLL. */
    66 #define FCVAR_CLIENTDLL			(1<<3)	/**< Defined by the client DLL. */
    67 #define FCVAR_MATERIAL_SYSTEM	(1<<4)	/**< Defined by the material system. */
    68 #define FCVAR_PROTECTED			(1<<5)	/**< It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value. */
    69 #define FCVAR_SPONLY			(1<<6)	/**< This cvar cannot be changed by clients connected to a multiplayer server. */
    70 #define	FCVAR_ARCHIVE			(1<<7)	/**< Set to cause it to be saved to vars.rc */
    71 #define	FCVAR_NOTIFY			(1<<8)	/**< Notifies players when changed. */
    72 #define	FCVAR_USERINFO			(1<<9)	/**< Changes the client's info string. */
    73 #define FCVAR_PRINTABLEONLY		(1<<10)	/**< This cvar's string cannot contain unprintable characters (e.g., used for player name, etc.) */
    74 #define FCVAR_UNLOGGED			(1<<11)	/**< If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log */
    75 #define FCVAR_NEVER_AS_STRING	(1<<12)	/**< Never try to print that cvar. */
    76 #define FCVAR_REPLICATED		(1<<13)	/**< Server setting enforced on clients. */
    77 #define FCVAR_CHEAT				(1<<14)	/**< Only useable in singleplayer / debug / multiplayer & sv_cheats */
    78 #define FCVAR_STUDIORENDER		(1<<15)	/**< Defined by the studiorender system. */
    79 #define FCVAR_DEMO				(1<<16)	/**< Record this cvar when starting a demo file. */
    80 #define FCVAR_DONTRECORD		(1<<17)	/**< Don't record these command in demo files. */
    81 #define FCVAR_PLUGIN			(1<<18)	/**< Defined by a 3rd party plugin. */
    82 #define FCVAR_DATACACHE			(1<<19)	/**< Defined by the datacache system. */
    83 #define FCVAR_TOOLSYSTEM		(1<<20)	/**< Defined by an IToolSystem library */
    84 #define FCVAR_FILESYSTEM		(1<<21)	/**< Defined by the file system. */
    85 #define FCVAR_NOT_CONNECTED		(1<<22)	/**< Cvar cannot be changed by a client that is connected to a server. */
    86 #define FCVAR_SOUNDSYSTEM		(1<<23)	/**< Defined by the soundsystem library. */
    87 #define FCVAR_ARCHIVE_XBOX		(1<<24)	/**< Cvar written to config.cfg on the Xbox. */
    88 #define FCVAR_INPUTSYSTEM		(1<<25)	/**< Defined by the inputsystem DLL. */
    89 #define FCVAR_NETWORKSYSTEM		(1<<26)	/**< Defined by the network system. */
    90 #define FCVAR_VPHYSICS			(1<<27)	/**< Defined by vphysics. */
    91 
    92 /**
    93  * @endsection
    94  */
    95 
    96 /**
    97  * Executes a server command as if it were on the server console (or RCON)
    98  *
    99  * @param format		Formatting rules.
   100  * @param ...			Variable number of format parameters.
   101  * @noreturn
   102  */
   103 native ServerCommand(const String:format[], any:...);
   104 
   105 /**
   106  * Inserts a server command at the beginning of the server command buffer.
   107  *
   108  * @param format		Formatting rules.
   109  * @param ...			Variable number of format parameters.
   110  * @noreturn
   111  */
   112 native InsertServerCommand(const String:format[], any:...);
   113 
   114 /**
   115  * Executes every command in the server's command buffer, rather than once per frame.
   116  *
   117  * @noreturn
   118  */
   119 native ServerExecute();
   120 
   121 /**
   122  * Executes a client command.  Note that this will not work on clients unless
   123  * they have cl_restrict_server_commands set to 0.
   124  *
   125  * @param client		Index of the client.
   126  * @param fmt			Format of the client command.
   127  * @param ...			Format parameters/
   128  * @noreturn
   129  * @error				Invalid client index, or client not connected.
   130  */
   131 native ClientCommand(client, const String:fmt[], any:...);
   132 
   133 /**
   134  * Executes a client command on the server without being networked.
   135  *
   136  * @param client		Index of the client.
   137  * @param fmt			Format of the client command.
   138  * @param ...			Format parameters
   139  * @noreturn
   140  * @error				Invalid client index, or client not connected.
   141  */
   142 native FakeClientCommand(client, const String:fmt[], any:...);
   143 
   144 /**
   145  * Sends a message to the server console.
   146  *
   147  * @param format		Formatting rules.
   148  * @param ...			Variable number of format parameters.
   149  * @noreturn
   150  */
   151 native PrintToServer(const String:format[], any:...);
   152 
   153 /**
   154  * Sends a message to a client's console.
   155  *
   156  * @param client		Client index.
   157  * @param format		Formatting rules.
   158  * @param ...			Variable number of format parameters.
   159  * @noreturn
   160  * @error				If the client is not connected an error will be thrown.
   161  */
   162 native PrintToConsole(client, const String:format[], any:...);
   163 
   164 /**
   165  * Reples to a message in a command.
   166  *
   167  * A client index of 0 will use PrintToServer().
   168  * If the command was from the console, PrintToConsole() is used.
   169  * If the command was from chat, PrintToChat() is used.
   170  *
   171  * @param client		Client index, or 0 for server.
   172  * @param format		Formatting rules.
   173  * @param ...			Variable number of format parameters.
   174  * @noreturn
   175  * @error				If the client is not connected or invalid.
   176  */
   177 native ReplyToCommand(client, const String:format[], any:...);
   178 
   179 /**
   180  * Returns the current reply source of a command.
   181  *
   182  * @return				ReplySource value.
   183  */
   184 native ReplySource:GetCmdReplySource();
   185 
   186 /**
   187  * Sets the current reply source of a command.
   188  *
   189  * Only use this if you know what you are doing.  You should save the old value
   190  * and restore it once you are done.
   191  *
   192  * @param source		New ReplySource value.
   193  * @return				Old ReplySource value.
   194  */
   195 native ReplySource:SetCmdReplySource(ReplySource:source);
   196 
   197 /**
   198  * Displays usage of an admin command to users depending on the 
   199  * setting of the sm_show_activity cvar.  Additionally, the client
   200  * who typed the command will receive the same text without any
   201  * client name prefix (as a confirmation).
   202  *
   203  * @param client		Client index doing the action, or 0 for server.
   204  * @param format		Formatting rules.
   205  * @param ...			Variable number of format parameters.
   206  * @noreturn
   207  * @error
   208  */
   209 native ShowActivity(client, const String:format[], any:...);
   210 
   211 /**
   212  * Same as ShowActivity(), except the tag parameter is used instead of
   213  * "[SM] " (note that you must supply any spacing).
   214  *
   215  * @param client		Client index doing the action, or 0 for server.
   216  * @param tag			Tag to display with.
   217  * @param format		Formatting rules.
   218  * @param ...			Variable number of format parameters.
   219  * @noreturn
   220  * @error
   221  */
   222 native ShowActivityEx(client, const String:tag[], const String:format[], any:...);
   223 
   224 /**
   225  * Called when a server-only command is invoked.  
   226  *
   227  * @params args			Number of arguments that were in the argument string.
   228  * @return				An Action value.  Not handling the command
   229  *						means that Source will report it as "not found."
   230  */
   231 functag SrvCmd Action:public(args);
   232 
   233 /**
   234  * Creates a server-only console command, or hooks an already existing one.  
   235  *
   236  * @param cmd			Name of the command to hook or create.
   237  * @param callback		A function to use as a callback for when the command is invoked.
   238  * @param description	Optional description to use for command creation.
   239  * @param flags			Optional flags to use for command creation.
   240  * @noreturn
   241  * @error				Command name is the same as an existing convar.
   242  */
   243 native RegServerCmd(const String:cmd[], SrvCmd:callback, const String:description[]="", flags=0);
   244 
   245 /**
   246  * Called when a generic console command is invoked.
   247  *
   248  * @param client		Index of the client, or 0 from the server.
   249  * @param args			Number of arguments that were in the argument string.
   250  * @return				An Action value.  Not handling the command
   251  *						means that Source will report it as "not found."
   252  */
   253 functag ConCmd Action:public(client, args);
   254 
   255 /**
   256  * Creates a console command, or hooks an already existing one.
   257  *
   258  * @param cmd			Name of the command to hook or create.
   259  * @param callback		A function to use as a callback for when the command is invoked.
   260  * @param description	Optional description to use for command creation.
   261  * @param flags			Optional flags to use for command creation.
   262  * @noreturn
   263  * @error				Command name is the same as an existing convar.
   264  */
   265 native RegConsoleCmd(const String:cmd[], ConCmd:callback, const String:description[]="", flags=0);
   266 
   267 /**
   268  * Creates a console command as an administrative command.  If the command does not exist,
   269  * it is created.  When this command is invoked, the access rights of the player are 
   270  * automatically checked before allowing it to continue.
   271  *
   272  * @param cmd			String containing command to register.
   273  * @param callback		A function to use as a callback for when the command is invoked.
   274  * @param adminflags	Administrative flags (bitstring) to use for permissions.
   275  * @param group			String containing the command group to use.  If empty,
   276  * 						the plugin's filename will be used instead.
   277  * @param description	Optional description to use for help.
   278  * @param flags			Optional console flags.
   279  * @noreturn
   280  * @error				Command name is the same as an existing convar.
   281  */
   282 native RegAdminCmd(const String:cmd[],
   283 					ConCmd:callback,
   284 					adminflags,
   285 					const String:description[]="",
   286 					const String:group[]="",
   287 					flags=0);
   288 					
   289 /**
   290  * Returns the number of arguments from the current console or server command.
   291  * @note Unlike the HL2 engine call, this does not include the command itself.
   292  *
   293  * @return				Number of arguments to the current command.
   294  */
   295 native GetCmdArgs();
   296 
   297 /**
   298  * Retrieves a command argument given its index, from the current console or 
   299  * server command.
   300  * @note Argument indexes start at 1; 0 retrieves the command name.
   301  *
   302  * @param argnum		Argument number to retrieve.
   303  * @param buffer		Buffer to use for storing the string.
   304  * @param maxlength		Maximum length of the buffer.
   305  * @noreturn
   306  */
   307 native GetCmdArg(argnum, String:buffer[], maxlength);
   308 
   309 /**
   310  * Retrieves the entire command argument string in one lump from the current 
   311  * console or server command.
   312  *
   313  * @param buffer		Buffer to use for storing the string.
   314  * @param maxlength		Maximum length of the buffer.
   315  * @noreturn
   316  */
   317 native GetCmdArgString(String:buffer[], maxlength);
   318 
   319 /**
   320  * Creates a new console variable.
   321  *
   322  * @param name			Name of new convar.
   323  * @param defaultValue	String containing the default value of new convar.
   324  * @param description	Optional description of the convar.
   325  * @param flags			Optional bitstring of flags determining how the convar should be handled. See FCVAR_* constants for more details.
   326  * @param hasMin		Optional boolean that determines if the convar has a minimum value.
   327  * @param min			Minimum floating point value that the convar can have if hasMin is true.
   328  * @param hasMax		Optional boolean that determines if the convar has a maximum value.
   329  * @param max			Maximum floating point value that the convar can have if hasMax is true.
   330  * @return				A handle to the newly created convar. If the convar already exists, INVALID_HANDLE is returned.
   331  * @error				Convar name is blank or is the same as an existing console command.
   332  */
   333 native Handle:CreateConVar(const String:name[], const String:defaultValue[], const String:description[]="", flags=0, bool:hasMin=false, Float:min=0.0, bool:hasMax=false, Float:max=0.0);
   334 
   335 /**
   336  * Searches for a console variable.
   337  *
   338  * @param name			Name of convar to find.
   339  * @return				A handle to the convar if it is found. INVALID_HANDLE otherwise.
   340  */
   341 native Handle:FindConVar(const String:name[]);
   342 
   343 /**
   344  * Called when a console variable's value is changed.
   345  *
   346  * @param convar		Handle to the convar that was changed.
   347  * @param oldValue		String containing the value of the convar before it was changed.
   348  * @param newValue		String containing the new value of the convar.
   349  * @noreturn
   350  */
   351 functag ConVarChanged public(Handle:convar, const String:oldValue[], const String:newValue[]);
   352 
   353 /**
   354  * Creates a hook for when a console variable's value is changed.
   355  *
   356  * @param convar		Handle to the convar.
   357  * @param callback		An OnConVarChanged function pointer.
   358  * @noreturn
   359  * @error				Invalid or corrupt Handle or invalid callback function.
   360  */
   361 native HookConVarChange(Handle:convar, ConVarChanged:callback);
   362 
   363 /**
   364  * Removes a hook for when a console variable's value is changed.
   365  *
   366  * @param convar		Handle to the convar.
   367  * @param callback		An OnConVarChanged function pointer.
   368  * @noreturn
   369  * @error				Invalid or corrupt Handle, invalid callback function, or no active hook on convar.
   370  */
   371 native UnhookConVarChange(Handle:convar, ConVarChanged:callback);
   372 
   373 /**
   374  * Returns the boolean value of a console variable.
   375  *
   376  * @param convar		Handle to the convar.
   377  * @return				The boolean value of the convar.
   378  * @error				Invalid or corrupt Handle.
   379  */
   380 native bool:GetConVarBool(Handle:convar);
   381 
   382 /**
   383  * Sets the boolean value of a console variable.
   384  *
   385  * @param convar		Handle to the convar.
   386  * @param value			New boolean value.
   387  * @param replicate		If set to true, the new convar value will be set on all clients.
   388  *						This will only work if the convar has the FCVAR_REPLICATED flag
   389  *						and actually exists on clients.
   390  * @param notify		If set to true, clients will be notified that the convar has changed.
   391  *						This will only work if the convar has the FCVAR_NOTIFY flag.
   392  * @noreturn
   393  * @error				Invalid or corrupt Handle.
   394  */
   395 native SetConVarBool(Handle:convar, bool:value, bool:replicate=false, bool:notify=false);
   396 
   397 /**
   398  * Returns the integer value of a console variable.
   399  *
   400  * @param convar		Handle to the convar.
   401  * @return				The integer value of the convar.
   402  * @error				Invalid or corrupt Handle.
   403  */
   404 native GetConVarInt(Handle:convar);
   405 
   406 /**
   407  * Sets the integer value of a console variable.
   408  *
   409  * @param convar		Handle to the convar.
   410  * @param value			New integer value.
   411  * @param replicate		If set to true, the new convar value will be set on all clients.
   412  *						This will only work if the convar has the FCVAR_REPLICATED flag
   413  *						and actually exists on clients.
   414  * @param notify		If set to true, clients will be notified that the convar has changed.
   415  *						This will only work if the convar has the FCVAR_NOTIFY flag.
   416  * @noreturn
   417  * @error				Invalid or corrupt Handle.
   418  */
   419 native SetConVarInt(Handle:convar, value, bool:replicate=false, bool:notify=false);
   420 
   421 /**
   422  * Returns the floating point value of a console variable.
   423  *
   424  * @param convar		Handle to the convar.
   425  * @return				The floating point value of the convar.
   426  * @error				Invalid or corrupt Handle.
   427  */
   428 native Float:GetConVarFloat(Handle:convar);
   429 
   430 /**
   431  * Sets the floating point value of a console variable.
   432  *
   433  * @param convar		Handle to the convar.
   434  * @param value			New floating point value.
   435  * @param replicate		If set to true, the new convar value will be set on all clients.
   436  *						This will only work if the convar has the FCVAR_REPLICATED flag
   437  *						and actually exists on clients.
   438  * @param notify		If set to true, clients will be notified that the convar has changed.
   439  *						This will only work if the convar has the FCVAR_NOTIFY flag.
   440  * @noreturn
   441  * @error				Invalid or corrupt Handle.
   442  */
   443 native SetConVarFloat(Handle:convar, Float:value, bool:replicate=false, bool:notify=false);
   444 
   445 /**
   446  * Retrieves the string value of a console variable.
   447  *
   448  * @param convar		Handle to the convar.
   449  * @param value			Buffer to store the value of the convar.
   450  * @param maxlength		Maximum length of string buffer.
   451  * @noreturn
   452  * @error				Invalid or corrupt Handle.     
   453  */
   454 native GetConVarString(Handle:convar, String:value[], maxlength);
   455 
   456 /**
   457  * Sets the string value of a console variable.
   458  *
   459  * @param convar		Handle to the convar.
   460  * @param value			New string value.
   461  * @param replicate		If set to true, the new convar value will be set on all clients.
   462  *						This will only work if the convar has the FCVAR_REPLICATED flag
   463  *						and actually exists on clients.
   464  * @param notify		If set to true, clients will be notified that the convar has changed.
   465  *						This will only work if the convar has the FCVAR_NOTIFY flag.
   466  * @noreturn
   467  * @error				Invalid or corrupt Handle.
   468  */
   469 native SetConVarString(Handle:convar, const String:value[], bool:replicate=false, bool:notify=false);
   470 
   471 /**
   472  * Returns the bitstring of flags on a console variable.
   473  *
   474  * @param convar		Handle to the convar.
   475  * @return				A bitstring containing the FCVAR_* flags that are enabled.
   476  * @error				Invalid or corrupt Handle.
   477  */
   478 native GetConVarFlags(Handle:convar);
   479 
   480 /**
   481  * Sets the bitstring of flags on a console variable.
   482  *
   483  * @param convar		Handle to the convar.
   484  * @param flags			A bitstring containing the FCVAR_* flags to enable.
   485  * @noreturn
   486  * @error				Invalid or corrupt Handle.
   487  */
   488 native SetConVarFlags(Handle:convar, flags);
   489 
   490 /**
   491  * Retrieves the specified bound of a console variable.
   492  *
   493  * @param convar		Handle to the convar.
   494  * @param type			Type of bound to retrieve, ConVarBound_Lower or ConVarBound_Upper.
   495  * @param value			By-reference cell to store the specified floating point bound value.
   496  * @return				True if the convar has the specified bound set, false otherwise.
   497  * @error				Invalid or corrupt Handle.
   498  */
   499 native bool:GetConVarBounds(Handle:convar, ConVarBounds:type, &Float:value);
   500 
   501 /**
   502  * Sets the specified bound of a console variable.
   503  *
   504  * @param convar		Handle to the convar.
   505  * @param type			Type of bound to set, ConVarBound_Lower or ConVarBound_Upper
   506  * @param set			If set to true, convar will use specified bound. If false, bound will be removed.
   507  * @param value			Floating point value to use as the specified bound.
   508  * @noreturn
   509  * @error				Invalid or corrupt Handle.
   510  */
   511 native SetConVarBounds(Handle:convar, ConVarBounds:type, bool:set, Float:value=0.0);
   512 
   513 /**
   514  * Retrieves the name of a console variable.
   515  *
   516  * @param convar		Handle to the convar.
   517  * @param value			Buffer to store the name of the convar.
   518  * @param maxlength		Maximum length of string buffer.
   519  * @noreturn
   520  * @error				Invalid or corrupt Handle.     
   521  */
   522 native GetConVarName(Handle:convar, const String:name[], maxlength);
   523 
   524 /**
   525  * Resets the console variable to its default value.
   526  *
   527  * @param convar		Handle to the convar.
   528  * @noreturn
   529  * @error				Invalid or corrupt Handle.
   530  */
   531 native ResetConVar(Handle:convar);
   532 
   533 funcenum ConVarQueryFinished
   534 {	
   535 	/**
   536 	 * Called when a query to retrieve a client's console variable has finished.
   537 	 *
   538 	 * @param cookie		Unique identifier of query.
   539 	 * @param client		Player index.
   540 	 * @param result		Result of query that tells one whether or not query was successful.
   541 	 *						See ConVarQueryResult enum for more details.
   542 	 * @param convarName	Name of client convar that was queried.
   543 	 * @param convarValue	Value of client convar that was queried if successful. This will be "" if it was not.
   544 	 * @param value			Value that was passed when query was started.
   545 	 * @noreturn
   546 	 */
   547 	public(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[], any:value),
   548 	
   549 	/**
   550 	 * Called when a query to retrieve a client's console variable has finished.
   551 	 *
   552 	 * @param cookie		Unique identifier of query.
   553 	 * @param client		Player index.
   554 	 * @param result		Result of query that tells one whether or not query was successful.
   555 	 *						See ConVarQueryResult enum for more details.
   556 	 * @param convarName	Name of client convar that was queried.
   557 	 * @param convarValue	Value of client convar that was queried if successful. This will be "" if it was not.
   558 	 * @noreturn
   559 	 */
   560 	public(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
   561 };
   562 
   563 /**
   564  * Starts a query to retrieve the value of a client's console variable.
   565  *
   566  * @param client		Player index.
   567  * @param name			Name of client convar to query.
   568  * @param callback		A function to use as a callback when the query has finished.
   569  * @param value			Optional value to pass to the callback function.
   570  * @return				A cookie that uniquely identifies the query. 
   571  *						Returns QUERYCOOKIE_FAILED on failure, such as when used on a bot.
   572  */
   573 native QueryCookie:QueryClientConVar(client, const String:cvarName[], ConVarQueryFinished:callback, any:value=0);
   574 
   575 /**
   576  * Gets a command iterator.  Must be freed with CloseHandle().
   577  *
   578  * @return				A new command iterator.
   579  */
   580 native Handle:GetCommandIterator();
   581 
   582 /**
   583  * Reads a command iterator, then advances to the next command if any.
   584  * Only SourceMod specific commands are returned.
   585  *
   586  * @param iter			Command iterator Handle.
   587  * @param name			Name buffer.
   588  * @param nameLen		Name buffer size.
   589  * @param eflags		Effective default flags of a command.
   590  * @param desc			Command description buffer.
   591  * @param descLen		Command description buffer size.
   592  * @return				True on success, false if there are no more commands.
   593  */
   594 native bool:ReadCommandIterator(Handle:iter, 
   595 								String:name[], 
   596 								nameLen, 
   597 								&eflags=0, 
   598 								String:desc[]="", 
   599 								descLen=0);
   600 
   601 /**
   602  * Returns whether a client has access to a command.  This takes into account
   603  * the override system built into SourceMod.
   604  *
   605  * @param client		Client index.
   606  * @param command		Command name.
   607  * @param flags			Default command flags.
   608  * @return				True if the client has access, false otherwise.
   609  */
   610 native bool:CheckCommandAccess(client, const String:command[], flags);