Page 1 of 1

Local serner log ins never locked out of server

Posted: Thu Dec 29, 2005 10:43 pm
by 1veedo
I get locked out of my server a lot because it's full. I think there needs to be an option for connections comming from either 127.0.0.1or in the network to always be able to log as, say, and extra rogue player. The reason is that there is absoltuely no lag and no bandwidth usage (in the network the usage is superfluous: 100mb? 25ft away?)

I dobt it would be very hard to do. You'd need an extra option for colors that "super users" could log in as and maybe tweak the server list: 8 regular 1 local just shows up 8/8 instead of 9/8.

Re: Local serner log ins never locked out of server

Posted: Thu Dec 29, 2005 11:04 pm
by Spazzy McGee
It does this:
1veedo wrote:Why is the quote butten right beside edit??

this is a good idea. prehaps allow it for any players joining the server on 'localhost', because there is so little bandwidth needed for locals.

Posted: Thu Dec 29, 2005 11:16 pm
by The Knights Who Say Ni
or a certain amount say _localPlayers numofplayers

Posted: Fri Dec 30, 2005 1:18 am
by L4m3r
Maybe an IP range that's never locked out?

I dunno, somehow I think it would be sorta tough to dynamically allow another player into the game like that. Plus, there's a bit of a security issue there, too.

Posted: Fri Dec 30, 2005 3:41 pm
by 1veedo
The security issue wouldn't be a direct exploit through. They could mask as you and thus pretend. But even still, logging on bzflag wouldn't do any harm. If somebody was able to do that then there would be much worse thigns they could be doign to your computer.

I actually have a kind of practical solution. Mod bzadmin to log on as a tank and just leave him in your extra rogue/whatever slot.

But I already have the impression people use bzadmin just to up their server in ths list. That would just make it worse.

Posted: Sun Jan 01, 2006 6:49 pm
by 1veedo
It's so easy :)

This works in the 2.0.4 version. Just open up bzfs.cxx and add this someware around line 1500

Code: Select all

  // no quick rejoining, make 'em wait
  // you can switch to observer immediately, or switch from observer
  // to regular player immediately, but only if last time time you
  // were a regular player isn't in the rejoin list. As well, this all
  // only applies if the game isn't currently empty.
  if ((playerData->player.getTeam() != ObserverTeam) &&
      (GameKeeper::Player::count() >= 0)) {
    float waitTime = rejoinList.waitTime (playerIndex);
    if (waitTime > 0.0f) {
      char buffer[MessageLen];
      DEBUG2 ("Player %s [%d] rejoin wait of %.1f seconds\n",
	      playerData->player.getCallSign(), playerIndex, waitTime);
      snprintf (buffer, MessageLen, "You are unable to begin playing for %.1f seconds.", waitTime);
      sendMessage(ServerPlayer, playerIndex, buffer);
      //      removePlayer(playerIndex, "rejoining too quickly");
      //      return ;
    }
  }



//add this part:
char ipp[13] = "192.168.2.80";

if(playerData->netHandler->getTargetIP()[13] == ipp[13])
{
DEBUG2 ("Player %s local login in.  Hopefully thi'll work.\n", playerData->player.getCallSign());}
else {
// reject player if asks for bogus team or rogue and rogues aren't allowed
  // or if the team is full or if the server is full
  if (!playerData->player.isHuman() && !playerData->player.isBot()) {
..........
   return ;
  }} //don't forget the closing bracket :)
Just change the IP to your innet IP or 127.0.0.1. I chose my local IP because the server shows up in the server list as tux.directnet and it's easier to choose that than typing in 127.0.0.1. But however you want to do it. I'm sure you know to throw in an OR if you want other computers to connect.

You can log in as rogue, blue, observer, whatever. Even if the game is completely full (11/10 players). I looked for other ways such as telling everybody there's one less tank playing rogue UNLESS it's comming from a specified IP ( team[RogueTeam].team.size < clOptions->maxTeam[RogueTeam]) ). There are other methods but I just went ozcoms razer and chose the easiest.

Maybe the developers can make something like this standard in future releases.

Posted: Sat Jan 07, 2006 9:50 pm
by 1veedo
Heh, ok this doesn't work. You need if ([0], [1]. [2] etc and it has segmation faults. I've tried some other things but I'm just going to give up on this.

bzadmin should be able to log on as rogue w/ an email string "place holder." It's finals wekk but when I get that done I'll post it for you guys.

PS: teams + 1 and numPlayers + 1 doesn't work for some reason...

Re: Local serner log ins never locked out of server

Posted: Sun Jan 08, 2006 4:59 am
by Workaphobia
1veedo wrote:The reason is that there is absoltuely no lag and no bandwidth usage (in the network the usage is superfluous: 100mb? 25ft away?)
Actually, since bandwidth per player increases depending on the number of players involved, additional local connections do contribute a cost. Imagine the bandwidth used by two remote connections, compared to the amount consumed by the same two players when their clients have to account for the positions of thirty other tanks originating from the server side.

Not that I think it's a bad idea to be able to log in as admin despite the server already being full.

Posted: Tue Jan 10, 2006 1:58 am
by 1veedo
Well yeah, I do realize that. But one player doesn't add a lot of data to be transfered.