I find myself wondering whether there is a more sophisticated way
of doing this sort of thing.

I've found myself in situations before, where I was attempting to
encourage people to learn Netrek, however, from behind my firewall at
home, SNAT presents all of us as the same IP address.

This is common now, and it's possible it may become more possible
as IPv6 is slowly rolled out, with IPv4 SNAT. It's a flaw in the
system. IP address != person.

Now, since then, I've managed to fake it out. I have 6 static Internet
accessible IP addresses on my home network. I can bind to 4 of them
on one machine, a 5th on a second, and a 6th on a third. But this
just exposes the problem. I can *still* cheat, if I really wanted to.

So, what is a person?

I'm thinking a 'person' should be measured more in terms of
interactivity. For example - if I'm truly good enough to run two
clients at once, from the same X display, why shouldn't it be
allowed? :-) What's the risk?

Well, maybe there is a risk that people set up clients on the
opposite team.

As an initial suggestion, I'm thinking that the same IP address can
be used as long as both clients are 'active'. Haven't thought too much
about measuring activity - but it shouldn't be too hard. The average
players sends dozens or hundreds of requests every minute. If less
than a dozen or two, the client is inactive.

Mostly: While Netrek is having trouble finding players, I'm not sure
that locking it down, preventing multiple players from the same
broadband Internet connection is such a great idea.

Cheers,
mark


On Fri, Apr 14, 2006 at 10:55:10PM +1000, James Cameron wrote:
> The following patch is for discussion.  It changes the t-mode scumming
> check by preventing t-mode from beginning at all if there are players
> present from the same IP address.  Once the duplication is resolved
> t-mode begins.
> 
> It is implemented as a state machine.  The state variable is:
> 
> static enum ts {
> 	TS_PICKUP, 
> 	TS_SCUMMERS,
> 	TS_BEGIN,
> 	TS_TOURNAMENT,
> 	TS_END
> } ts = TS_PICKUP;
> 
> Alternate ideas I've been playing with ...
> 
> - exclude the duplicate IP players from the total per team, such that
>   with four clients on Federation from the same IP, they'd need another
>   three ships before Federation would be considered to have quorum,
> 
> - make CHECKSCUM a maximum number of duplicates allowed, so that
>   legitimate players from the same IP are permitted,
> 
> - if every slot is guest, don't care, allow t-mode.
> 
> (The intention is to hinder the social "problem" of players feeding
> their character kills while waiting for other players to arrive.
> Distortion of t-mode statistics.  It's not that I care about the
> statistics, it's that people perceive the problem.)
> 
> -- 
> James Cameron    mailto:quozl at us.netrek.org     http://quozl.netrek.org/

> Index: ntserv/daemonII.c
> ===================================================================
> RCS file: /cvsroot/netrek/server/Vanilla/ntserv/daemonII.c,v
> retrieving revision 1.6
> diff -u -r1.6 daemonII.c
> --- ntserv/daemonII.c	14 Apr 2006 10:19:17 -0000	1.6
> +++ ntserv/daemonII.c	14 Apr 2006 12:44:22 -0000
> @@ -67,7 +67,7 @@
>  /* file scope prototypes */
>  static void check_load(void);
>  static int tournamentMode(void);
> -static int check_scummers(void);
> +static int check_scummers(int);
>  static void move(int ignored);
>  static void udplayersight(void);
>  static void udplayers(void);
> @@ -394,7 +394,7 @@
>     Nick Trown   12/19/92
>  */
>  
> -static int check_scummers(void)
> +static int check_scummers(int verbose)
>  {
>      int i, j;
>      int num;
> @@ -443,7 +443,8 @@
>              }
>            }
>          }
> -        if (num>1){
> +        if (num>0){
> +            if (!verbose) return 1;
>              pmessage(0,MALL,"GOD->ALL", "*****************************************");
>              pmessage(0,MALL,"GOD->ALL","Possible t-mode scummers have been found.");
>              pmessage(0,MALL,"GOD->ALL","They have been noted for god to review.");
> @@ -553,6 +554,13 @@
>      static int oldtourn=0;
>      static int oldmessage;
>      int old_robot;
> +    static enum ts {
> +	    TS_PICKUP, 
> +	    TS_SCUMMERS,
> +	    TS_BEGIN,
> +	    TS_TOURNAMENT,
> +	    TS_END
> +    } ts = TS_PICKUP;
>  
>      /* Don't tell us it's time for another move in the middle of a move. */
>      (void) SIGNAL(SIGALRM, SIG_IGN);
> @@ -618,24 +626,49 @@
>          pmessage(0, MALL, "GOD->ALL","Loading new server configuration.");
>      }
>  
> -    if (tournamentMode()) {
> -        if (!oldtourn) {
> -            if (check_scum)     
> -                check_scummers();               /* NBT */
> -            oldmessage=(random() % 8);
> +    switch (ts) {
> +    case TS_PICKUP:
> +	    status->tourn = 0;
> +	    if (tournamentMode()) {
> +		    ts = TS_BEGIN;
> +		    if (check_scum && check_scummers(1))
> +			    ts = TS_SCUMMERS;
> +	    }
> +	    break;
> +
> +    case TS_SCUMMERS:
> +	    status->tourn = 0;
> +	    if (!tournamentMode()) {
> +		    ts = TS_PICKUP;
> +	    } else {
> +		    if (!check_scum) {
> +			    ts = TS_BEGIN;
> +			    break;
> +		    }
> +		    if (!check_scummers(0))
> +			    ts = TS_BEGIN;
> +	    }
> +	    break;
> +
> +    case TS_BEGIN:
> +	    oldmessage = (random() % 8);
>  	    political_begin(oldmessage);
> -        }
> -        oldtourn=1;
> -        status->tourn=1;
> -        status->time++;
> -        tourntimestamp = ticks;
> -    } else {
> -        if (oldtourn) {
> +	    ts = TS_TOURNAMENT;
> +            /* break; */
> +
> +    case TS_TOURNAMENT:
> +            status->tourn = 1;
> +            status->time++;
> +            tourntimestamp = ticks;
> +            if (tournamentMode()) break;
> +            ts = TS_END;
> +            /* break; */
> +
> +    case TS_END:
>              tourntimestamp = ticks; /* record end of Tmode 8/2/91 TC */
> -	    political_end(oldmessage);
> -        }
> -        oldtourn=0;
> -        status->tourn=0;
> +            political_end(oldmessage);
> +            ts = TS_PICKUP;
> +            break;
>      }
>  
>  #ifdef PUCK_FIRST




> _______________________________________________
> netrek-dev mailing list
> netrek-dev at us.netrek.org
> http://mailman.us.netrek.org/listinfo/netrek-dev


-- 
mark at mielke.cc / markm at ncf.ca / markm at nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/