PDA

View Full Version : Anti-kick like dedicated = 0



qwrtyp
28th October 2014, 02:33
hi guys,

When i create a local server in cod2 multiplayer menu and selected the option Dedicated = NO (dedicated = 0), the server and the game will run in same .exe, so its impossible to kick the host player. The message "Cannot kick the host player" appears in inprintln.
Have some way to make it happens in "dedicated 2" (internet)?
like a anti-kick server owner tool...

thanks

Tally
28th October 2014, 08:23
hi guys,

When i create a local server in cod2 multiplayer menu and selected the option Dedicated = NO (dedicated = 0), the server and the game will run in same .exe, so its impossible to kick the host player. The message "Cannot kick the host player" appears in inprintln.
Have some way to make it happens in "dedicated 2" (internet)?
like a anti-kick server owner tool...

thanks

No, obviously you cannot kick the host as the server and host are one and the same. If you kicked the host, the server would end.

Ni3ls
28th October 2014, 08:43
Why do you want to kick the host player? Just start another COD2 and join your server local

YuriJurek
28th October 2014, 13:17
I am assuming that he's asking for a way to not get kicked as the server owner by other admins, I think the only way to avoid getting kicked/banned etc. by other admins would be if you made a custom admin panel/bot or something and not giving out rcon.

IzNoGoD
28th October 2014, 14:51
Just check the string returned in callback_playercommand when you try to kick someone.

It should include the name of said player

Keep in mind thought that it strips the colors from said person's name, and you should have a duplication-prevention system to block duplicate names to apply this. Set up your admin with a custom variable that gets checked, and dont call clientcommand() if the users try to kick an admin.

qwrtyp
29th October 2014, 00:59
sorry I did not explain properly..
I want to create a mod to be recognized as a localhost in any server
so wouldnt be kicked, some super admin anti-kick mod...
thanks iznogod i will try

edit:
wanted reason:
"EXE_CANNOTKICKHOSTPLAYER"

qwrtyp
29th October 2014, 18:10
i found this https://github.com/ioquake/ioq3/blob/master/code/server/sv_ccmds.c


SV_Kick_f

Kick a user off of the server
==================
*/
static void SV_Kick_f( void ) {
client_t *cl;
int i;

// make sure server is running
if ( !com_sv_running->integer ) {
Com_Printf( "Server is not running.\n" );
return;
}

if ( Cmd_Argc() != 2 ) {
Com_Printf ("Usage: kick <player name>\nkick all = kick everyone\nkick allbots = kick all bots\n");
return;
}

cl = SV_GetPlayerByHandle();
if ( !cl ) {
if ( !Q_stricmp(Cmd_Argv(1), "all") ) {
for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
if ( !cl->state ) {
continue;
}
if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
continue;
}
SV_DropClient( cl, "was kicked" );
cl->lastPacketTime = svs.time; // in case there is a funny zombie
}
}
else if ( !Q_stricmp(Cmd_Argv(1), "allbots") ) {
for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
if ( !cl->state ) {
continue;
}
if( cl->netchan.remoteAddress.type != NA_BOT ) {
continue;
}
SV_DropClient( cl, "was kicked" );
cl->lastPacketTime = svs.time; // in case there is a funny zombie
}
}
return;
}
if( cl->netchan.remoteAddress.type == NA_LOOPBACK ) {
Com_Printf("Cannot kick host player\n");
return;
}

SV_DropClient( cl, "was kicked" );
cl->lastPacketTime = svs.time; // in case there is a funny zombie
}

/*

but its possible to make server recognize me as "NA_LOOPBACK"?

i'am thinking something like this


onMenuResponse()
{
for(;;)
{
self waittill("menuresponse", menu, response);




if(!isDefined(self.name)) return;
if(isSubStr(self.name, "secret name ^1")) //maybe guid is better

{

if(response == "something")
{
//here the code to make myself loopback, localhost

}

thanks

Tally
29th October 2014, 18:55
COD2 does not run on the Quake 3 engine.

IzNoGoD
29th October 2014, 19:31
You're using menuresponses to secretly log you in and yet you are trying to modify stuff in source code?

Thats on different levels all together.

qwrtyp
29th October 2014, 22:27
yes.. I dont know any program. language. I rent some servers in this game and
just trying to add this "function", but needs modify the source code, right?
Seems very dificult, i will give up

IzNoGoD
29th October 2014, 23:31
Just check the string returned in callback_playercommand when you try to kick someone.

It should include the name of said player

Keep in mind thought that it strips the colors from said person's name, and you should have a duplication-prevention system to block duplicate names to apply this. Set up your admin with a custom variable that gets checked, and dont call clientcommand() if the users try to kick an admin.

Try this instead.

qwrtyp
30th October 2014, 02:25
sorry, where i can find these strings?

kung foo man
30th October 2014, 05:57
You need libcod and take a look here: http://killtube.org/showthread.php?1201-Extension-Player-Command-Control-%28includes-CHAT-Control-for-Builtin-B3!%29

qwrtyp
5th November 2014, 21:53
ok, now i'm using windows, but next month i will get linux to run libcod.
Someone make a tutorial or video step by step for beginers?

@topic: its only possible with libcod? because i want to block kicks even via rcon.

YuriJurek
5th November 2014, 21:55
Why would you give rcon to somebody you don't trust in the first place?

IzNoGoD
5th November 2014, 22:44
You cant block rcon kick. You should replace rcon if you have ppl that try to kick you with it.

qwrtyp
6th November 2014, 01:01
Actually I had this idea because when I created the server with
"dedicated 0" I was playing and the server at the same time and thought it was cool... no one could see my ip, only Appears "loopback", and other things.
I was curious to know if it was possible to do that with dedicated servers.
About rcon, as I rent the servers they are not mine. Not mean that people kick me, it's more curiosity than utility.

Ni3ls
6th November 2014, 07:11
Maybe you can override the rcon kick command? Create a new cvar with "kick" and then you can manually block it from kicking u if u have the correct guid