Local serner log ins never locked out of server

Make suggestions for improving one of the best games on the net!
Post Reply
1veedo
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Local serner log ins never locked out of server

Post by 1veedo » Thu Dec 29, 2005 10:43 pm

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.
Last edited by 1veedo on Thu Dec 29, 2005 10:46 pm, edited 1 time in total.
1veedo (libcurl.so.2) I have version 3!

User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1403
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom
Contact:

Re: Local serner log ins never locked out of server

Post by Spazzy McGee » Thu Dec 29, 2005 11:04 pm

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.
"Life is what happens to you while you're busy making other plans." - John Lennon

User avatar
The Knights Who Say Ni
Private First Class
Private First Class
Posts: 556
Joined: Mon Sep 26, 2005 7:21 pm
Location: Uplyme, England
Contact:

Post by The Knights Who Say Ni » Thu Dec 29, 2005 11:16 pm

or a certain amount say _localPlayers numofplayers
Image
Sig Made By AlliedArmour

TGPH

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Fri Dec 30, 2005 1:18 am

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.
Optimism is just a milder alternative to denial.

1veedo
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Post by 1veedo » Fri Dec 30, 2005 3:41 pm

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.
1veedo (libcurl.so.2) I have version 3!

1veedo
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Post by 1veedo » Sun Jan 01, 2006 6:49 pm

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.
1veedo (libcurl.so.2) I have version 3!

1veedo
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Post by 1veedo » Sat Jan 07, 2006 9:50 pm

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...
1veedo (libcurl.so.2) I have version 3!

User avatar
Workaphobia
Master Sergeant
Master Sergeant
Posts: 252
Joined: Wed May 26, 2004 7:29 pm

Re: Local serner log ins never locked out of server

Post by Workaphobia » Sun Jan 08, 2006 4:59 am

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.
"Nifty News Fifty: When news breaks, we give you the pieces."

1veedo
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Post by 1veedo » Tue Jan 10, 2006 1:58 am

Well yeah, I do realize that. But one player doesn't add a lot of data to be transfered.
1veedo (libcurl.so.2) I have version 3!

Post Reply