16.05.2016, 18:03
I have an offline IRC command to change user's name, the command works fine but I need to detect if the admin enters an illegal character in the new name. For example if they type !changename oldname {tag}newname it should give an error message saying the new name contains an illegal characters i.e { }
I know SetPlayerName function would check for illegal characters itself but the command is for offline name change only so the function cannot be called.
I tried making a function to detect them by creating an array of legal characters and checking if the string has those characters there, but I failed. The function returns error only if the first character from the string is illegal.
Anyone can help me out?
I know SetPlayerName function would check for illegal characters itself but the command is for offline name change only so the function cannot be called.
I tried making a function to detect them by creating an array of legal characters and checking if the string has those characters there, but I failed. The function returns error only if the first character from the string is illegal.
Anyone can help me out?