Bot_ExistsInServer: ddecolorize names before comparing.
This commit is contained in:
parent
ffa3645395
commit
48b76b8786
1 changed files with 5 additions and 1 deletions
|
@ -17,9 +17,13 @@
|
|||
bool
|
||||
Bot_ExistsInServer(string botName)
|
||||
{
|
||||
string noColor1 = strdecolorize(botName);
|
||||
|
||||
for (entity e = world;(e = find(e, ::classname, "player"));) {
|
||||
if (clienttype(e) == CLIENTTYPE_BOT) {
|
||||
if (e.netname == botName) {
|
||||
string noColor2 = strdecolorize(e.netname);
|
||||
|
||||
if (noColor1 == noColor2) {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue