crapy clawn forums

don't u bored to play always same game since years with his "i aim the feet/birds i head shot"
It is currently Mon Aug 25, 2025 2:47 pm

All times are UTC-06:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Aug 11, 2009 12:43 am 
Offline
Site Admin
User avatar

Joined: Thu May 19, 2005 9:20 am
Posts: 3783
hi!

in july hogg wished for a way to keep track of all the rage quits so we can post them on the wikipenia, point, and laugh.

Here ya go:

to get a log from console put -condebug in your l4d launch options then check:
C:\program files\steam\steamapps\common\left 4 dead\left4dead\console.log

here's the goods:
http://www.crapyclawn.net/wikipenia/ind ... Rage_Quits
Code:
#suck my shebang.

# declare variables
my $inp;
my $out;
my %joiners;
my @quits;

# Find all detailed connects with playerId and gamertag. Add them to the hash.
open($inp, "<", "console.log");
while (<$inp>) {
	if (/New client. Client Info: ID: (\d+?), Players: 1, Gamertag: (.+?),/) {
	# print "$1 - ";
	# print "$2\n";
	$joiners{$1} = $2;
}
}

# Match the playerID and gamertag to any disconnects missing a gamertag, then store that gamertag.
open($inp, "<", "console.log");
while (<$inp>) {
	while (($key, $value) = each(%joiners)){
		# print $key."  ".$value."\n";
		if (/Dropped player: $key/) {
		push (@quits, "*$value\n");
	}
}
}

# store any clean quits.
open($inp, "<", "console.log");
while (<$inp>) {
		if (/Player (.+?) left the game/) {
		push (@quits, "*$1\n");
	}
}

# De dupe any repeats in the list.
   my %hash = map { $_, 1 } @quits;
   # or a hash slice: @hash{ @array } = ();
   # or a foreach: $hash{$_} = 1 foreach ( @array );
   my @unique = keys %hash;

#Store them for posterity:
open($out, ">>", "ragelog.txt");
print $out @unique;
close $out;
print "These rage quitters have been logged:\n";
print @unique;
# thank you to http://perldoc.perl.org/perlfaq4.html#How-can-I-remove-duplicate-elements-from-a-list-or-array%3f for the dedupe.

_________________
We're all gonna die, but I got a helmet.
http://www.explodingdog.com/january2/we ... nadie.html


Top
   
 Post subject:
PostPosted: Tue Aug 11, 2009 4:07 pm 
Offline
are you laughin now, beeyotch?
User avatar

Joined: Sun Dec 05, 2004 1:38 pm
Posts: 2118
Location: butt
http://www.pointpark.edu/default.aspx?id=1454

Rager quit.

_________________
And Darkness and Decay and The Underscores held illimitable dominion over all.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited