Made it so that players can type commands and "me" (when targeting a player) any way they want. There doesn't need to be an exact match full lower case anymore for both of these
Added the ability to find players by typing a part of their name (starting from the beginning of their names) instead of having to type their full names all the time.
For example to kill Resxt you can now just type !kill res
If there is a player named Resxt and another named Resxtola then typing !kill resxt will kill Resxt because we got an exact match. If you type !kill Resx it won't kill anyone because there are two potential players found so we can't be sure who the command should be run on. If you type !kill Resxto it will kill Resxtola
Improve the "FindPlayerByName" function, the current one only finds the full name of the player and this is not practical in reality because players usually have long and difficult to write names, however the new function looks for a substring that matches the name of the player, which makes it much easier to search for the player's name as long as a unique substring is provided within the player's name.
Push changes that should have been pushed with 1.4.0
Fix permission issues with aliases causing the script to return that a command doesn't exist when you don't have access to the alias instead of saying you don't have the permission as expected
[Refactor] Change ExecuteCommand and TryExecuteCommand function names to reflect changes made in the T6 script that fixed an issue. The change here is only made to keep a logic between the scripts but that bug didn't exist in the IW5 version due to how IW5 works
Added an alias system so that a command can be called with different names.
The alias commands respects the permission system and can be used seemingly with the help and alias command.
The commands command still only lists the original/full command name, it doesn't list aliases
CreateCommand now has an addition argument commands can use: commandAliases
Added a new !alias or !aliases command
With these commands you can get the available alias(es) of a command by its original name or one of its alias
For example !alias god or !alias godmode
Some refactor to make the ChatListener function easier to read along with some comments to separate each command logic (built-in commands and "any other command")
Added CommandAliasesDoesNotExistError
Added GetCommandNameFromAlias util function
Only create variables for the port currently in-use
For example: there's no need to create level.chat_commands["27017"] if the currently used port is 27016. This simply adds a bunch of variables and child variables for no reason, this was a flawed implementation that create an array per port on every server. Now it will only create an array for its own port as expected
Removed 27018 from the default ports
This is to make the default experience more generic across other chat_commands projects. One port for default private games and another port the expected/most used port for dedicated servers
Give dead silence pro to avoid dying when falling from a high height.
This only gives it if the player doesn't have it already and it only takes it away if it was granted by the god mode in the first time