bebeli555 / CookieClient

CookieClient is a utility client for anarchy servers
95 stars 18 forks source link

Fix: command prefix bug #5

Closed TheA4Paper closed 3 years ago

TheA4Paper commented 3 years ago

Cap with a K said that he broke the thing when he set the prefix to "g" he couldn't use ggui command I discovered that it's a very easy to fix bug. the old code replace the command prefix with "", in this case it will replace every "g" in the message cause ggui to turn into ui instead of an expected gui

so I replace message.replace(prefix, "") to message.substring(prefix.length()) and this seem to fix the problem