#!/usr/bin/perl -wT # # Script: Dynamic Dungeon Siege IP Databas Deactivation Script # Author: Guildencrantz # Version: 4-14-02 # use strict; use CGI::Carp 'fatalsToBrowser'; use DB_File; my $activeIPsPath = "/var/www/cgi-bin/ds/database/activeIPs"; my $allIPsPath = "/var/www/cgi-bin/ds/database/allIPsPath"; open ACTIVE, "<$activeIPsPath" or die "Cannot open activeIPs list: $!"; my $counter = 0; my $found = 0; my @ips; while () { chomp; unless ( $_ == $ENV{REMOTE_ADDR} ) { $ips[$counter] = $_; } else { $found = 1; } } close ACTIVE; if( $found ) { open ACTIVE, ">$activeIPsPath" or die "Cannot recreate activeIPs list: $!"; foreach(@ips) { print "$_\n"; } close ACTIVE; print "Content-type: text/html\n\n"; print < Deactivated!

Your IP has been removed from the list of active game servers

You will be forwarded to the active servers list in 5 seconds

END_OF_BLOCK } else { print "Content-type: text/html\n\n"; print < STUMPED!

Your IP was not found in the active servers list!

END_OF_BLOCK; tie my %allIPs, "DB_File", $allIPsPath or die "Could not open allIPs database: $!"; if(exists $allIPs{$ENV{REMOTE_ADDR}}) { print < However your IP is registered in our complete list of IPs:

END_OF_BLOCK print "$allIPs{$ENV{REMOTE_ADDR}}"; untie %allIPs; print < If you forgot to activate the IP before your game, well, we're sorry and hope you remember next time. If you were trying to activate your IP before you start a game, please click on a ACTIVATE IP link. If you reached this page in error, I'm sorry and wish you better luck next time.

You will be forwarded to the list of active servers in 15 seconds

END_OF_BLOCK } else { print "Content-type: text/html\n\n"; print < STUMPED!

Your IP does not seem to be in any of our records!

END_OF_BLOCK print "This IP, $ENV{REMOTE_ADDR}, is not in either the active servers list, or in our complete database of servers."; print < 1) You are using DHCP and when you renewed you got a different IP.
2) You moved your computer (laptop users, this is likely to happen a lot) 3) You installed a firewall and the server is now reading the firewall's IP.

Basically it all comes down to the fact that this server uses the CURRENT IP when doing anything. I'm going to look into a method of using the MAC address (this is a hardware address that is specific to your network card) which should eliminate some problems with people moving their machines around.

Your option now is two either fill out the submission form again, which will create an entry in the database for THIS IP, or you can try to get your old IP back and activate that (this would be a bit rediculous in most cases).

You will be forwarded to the active server list in 30 seconds

} }
IP User Name Server Name Server Password Game Difficulty World Difficulty Map Drop on Death Team Play Enabled Player Pause Enabled Player vs. Player Enabled Join Game in Progress Choose Start Location Enabled New Characters Only