.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Releases, Installers, Docs & Coding (http://forums.bots-united.com/forumdisplay.php?f=48)
-   -   "Kick Bot" and AMX (http://forums.bots-united.com/showthread.php?t=1982)

g4s 16-06-2004 04:51

"Kick Bot" and AMX
 
sPlOrYgOn, remember I started a thread talking about using "kick bot" would disable lots of features of amx? and you said that this had happened to you.

When I was looking at the FakeFull (from OLO) code last night, I noticed FF uses different method to kick bots and that would not affect anything of AMX. I tried to use that on PB, but I failed...:( Here is the code

PB
Code:

sprintf (cmd, "kick \"%s\"\n", STRING (bots[i].pEdict->v.netname));
SERVER_COMMAND (cmd); // kick the bot using (kick "name")

FF
Code:

Void RemoveFakeClient() {
        ...
        SERVER_COMMAND(UTIL_VarArgs("kick \"%s\"\n",STRING(pFake->pEdict->v.netname)));
        ...
}
 
char* UTIL_VarArgs(char *format, ...) {
        va_list argptr;
        static char string[1024];
        va_start (argptr, format);
        vsprintf (string, format, argptr);
        va_end (argptr);
        return string;
}

I don't if this is the reason caused the problem, so could you please take a look at this? Thank you very much.

sPlOrYgOn 16-06-2004 04:56

Re: "Kick Bot" and AMX
 
well all he does is instead of using the standard library function he made his own that does pretty much the same thing.. except return it instead of putting it into a variable which we pass to it..

g4s 16-06-2004 05:00

Re: "Kick Bot" and AMX
 
hummm...OK, but why that problem doesn't happen when FF kick a bot?

sPlOrYgOn 16-06-2004 05:03

Re: "Kick Bot" and AMX
 
probably something with freeing the bot's info from the game after the kick...
FF doesn't do much except have a "client" stay in spectator mode..
Maybe it's because we don't clear the address of the bot's edict from the bot array when the bot leaves..

g4s 16-06-2004 05:13

Re: "Kick Bot" and AMX
 
Thanks for the quick replies sPlOrYgOn.

Since lots of bot servers use AMX/AM/... and with auto-kick enabled, I hope this can be fixed in the near future. :)

Pierre-Marie Baty 16-06-2004 05:22

Re: "Kick Bot" and AMX
 
I would advise to reset cleanly the whole bot structure immediately after a bot is kicked... and check for any pending external dependencies that could cause trouble.

sPlOrYgOn 16-06-2004 05:50

Re: "Kick Bot" and AMX
 
heres a test dll for you g4s
I've memset the bot's slot on the array to 0 when he leaves...
http://www.mapzap.org/podbot/podbotBETA.zip

g4s 16-06-2004 09:55

Re: "Kick Bot" and AMX
 
thanks sPlOrYgOn, unfortuantly it doesn't work, just same as before.
it can be simply tested by the welcome message. after I kick a bot and join the server, welcome display doesn't show up, and the respawn stops working,...
i think there's something wrong with player id handling. after a bot is kicked, player ids are messed up so that amx is not enable to find such a player with certain playerid. anyways, thank you for compiling the test dll. i'll try to go through the source and see what i can find out.
damn i cant help too much!>:(


All times are GMT +2. The time now is 06:51.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.