Implemented the actual tab completion for commands and playernames.

Each command is reported only if the player has the permission to use it.
This commit is contained in:
madmaxoft
2013-07-31 11:16:11 +02:00
parent e9f18f8b4f
commit e8a907d89e
4 changed files with 30 additions and 16 deletions
+4 -2
View File
@@ -197,8 +197,10 @@ public: // tolua_export
/// Executes the command split into a_Split, as if it was given on the console. Returns true if executed. Output is sent to the a_Output callback
bool ExecuteConsoleCommand(const AStringVector & a_Split, cCommandOutputCallback & a_Output);
/// Appends all commands beginning with a_Text (case-insensitive) into a_Results
void TabCompleteCommand(const AString & a_Text, AStringVector & a_Results);
/** Appends all commands beginning with a_Text (case-insensitive) into a_Results.
If a_Player is not NULL, only commands for which the player has permissions are added.
*/
void TabCompleteCommand(const AString & a_Text, AStringVector & a_Results, cPlayer * a_Player);
private:
friend class cRoot;