| 993 | COMMAND(idlebots, "i"); |
| 994 | |
| 995 | void kickbot(const char *szName) |
| 996 | { |
| 997 | if(!botmode()) return; |
| 998 | if (!szName || !(*szName)) |
| 999 | return; |
| 1000 | |
| 1001 | int iBotInd = -1; |
| 1002 | loopv(bots) |
| 1003 | { |
| 1004 | if (!bots[i]) continue; |
| 1005 | |
| 1006 | if (!strcmp(bots[i]->name, szName)) |
| 1007 | { |
| 1008 | iBotInd = i; |
| 1009 | break; |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | if (iBotInd != -1) |
| 1014 | { |
| 1015 | botent *d = bots[iBotInd]; |
| 1016 | if(d->name[0]) conoutf("bot %s disconnected", d->name); |
| 1017 | delete d->pBot; |
| 1018 | bots.remove(iBotInd); |
| 1019 | freebotent(d); |
| 1020 | } |
| 1021 | } |
| 1022 | |
| 1023 | COMMAND(kickbot, "s"); |
| 1024 |
nothing calls this directly
no test coverage detected