Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Anti-kick like dedicated = 0

  1. #1
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Talking Anti-kick like dedicated = 0

    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

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by qwrtyp View Post
    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.

  3. The Following User Says Thank You to Tally For This Useful Post:

    qwrtyp (29th October 2014)

  4. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Why do you want to kick the host player? Just start another COD2 and join your server local

  5. #4
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    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.

  6. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    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.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. The Following User Says Thank You to IzNoGoD For This Useful Post:

    qwrtyp (29th October 2014)

  8. #6
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts
    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"
    Last edited by qwrtyp; 29th October 2014 at 02:13.

  9. #7
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Unhappy

    i found this https://github.com/ioquake/ioq3/blob...ver/sv_ccmds.c

    Code:
    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

    Code:
    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

  10. #8
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    COD2 does not run on the Quake 3 engine.

  11. #9
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    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.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  12. #10
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •