Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » Question about renchat2
Question about renchat2 [message #89203] Fri, 21 May 2004 11:58 Go to previous messageGo to previous message
snipesimo is currently offline  snipesimo
Messages: 764
Registered: February 2003
Karma:
Colonel
I am yet to attempt to script this, but I will paste the PERL code Blazer uses to retrieve the info. If he doesn't want it posted, he can remove it.

[20:22] [Blazer]: wol rank is a bit more difficult
[20:22] [Blazer]: you have to POST info to their server, and parse the output
[20:22] [Blazer]: not just a get
[20:23] [Blazer]: my $req = HTTP::Request->new(POST => 'http://renchat2.westwood.com/cgi-bin/reneg
[20:23] [Blazer]: ade/individual/carpenter');
[20:23] [Blazer]: @data = split(/\n\n\n\n\n\n/,$content);
[20:23] [Blazer]: $lines = (@data);
[20:23] [Blazer]: #print "Data contains $lines lines.\n";
[20:23] [Blazer]: for $line (@data) {
[20:23] [Blazer]: if ( $line =~ m/(\d+)\s\n(.+)\n\s(\w+)\n(\d+)wins\/(\d+)losses\n([\d\,]+)/ )
[20:23] [Blazer]: {
[20:23] [Blazer]: $name=lc($3);
[20:23] [Blazer]: if ($name eq $user) {
[20:23] [Blazer]: # print "Found $3!\n";
[20:23] [Blazer]: $kernel->post($pci, 'privmsg', ReplyTo($env), "WOL Rank: $1 WOL Titl
[20:23] [Blazer]: e: $2 WOL Name: $3\n");
[20:23] [Blazer]: $kernel->post($pci, 'privmsg', ReplyTo($env), "Wins: $4 Losses: $
[20:23] [Blazer]: 5 Ladder Points: $6\n");
[20:23] [Blazer]: return;
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Post your picture
Next Topic: Public Service Announcment from Dante...nasty virus
Goto Forum:
  


Current Time: Sun Jul 14 07:06:34 MST 2024

Total time taken to generate the page: 0.00763 seconds