Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

sacked's scratchpad

by sacked (Hermit)
on Jun 01, 2004 at 18:07 UTC ( [id://358333]=scratchpad: print w/replies, xml ) Need Help??

download
zackse@ahumado:/opt/src$ diff -ur PerlMonksModules/ PerlMonksModules.n +ew/ diff -ur PerlMonksModules/PerlMonks/Chat.pm PerlMonksModules.new/PerlM +onks/Chat.pm --- PerlMonksModules/PerlMonks/Chat.pm Mon Aug 19 12:39:56 2002 +++ PerlMonksModules.new/PerlMonks/Chat.pm Sat Aug 24 01:16:15 20 +02 @@ -58,7 +58,7 @@ # Get general chat messages if ($c=$self->getpage(CHAT_URL)) { $c=~s/[\r\n\t]//g; - my @msgs=($c=~/message\s+author="([^\"]+)"[^>]+>\s*(.*?)\s*<\/mes +sage>/g); + my @msgs=($c=~/message\s+user_id="\d+"\s+author="([^\"]+)"[^>]+>\ +s*(.*?)\s*<\/message>/g); if (@msgs) { while (@msgs) { my ($author, $msg)=(shift(@msgs),shift(@msgs)); @@ -91,9 +91,10 @@ if ($self->{cookie_jar}) { if ($c=$self->getpage(PRIVATE_URL)) { $c=~s/[\r\n\t]//g; - my @msgs=($c=~/message\s+message_id="(\d+)"\s+author="([^\"]+)" +[^>]+>\s*(.*?)\s*<\/message>/g); + my @msgs=($c=~/message\s+user_id="\d+"\s+author="([^\"]+)"\s+ti +me="\d+"\s+message_id="(\d+)"[^>]+>\s*(.*?)\s*<\/message>/g); + while (@msgs) { - my ($mid, $author, $msg)=(shift(@msgs),shift(@msgs),shift(@msg +s)); + my ($author, $mid, $msg)=(shift(@msgs),shift(@msgs),shift(@msg +s)); # Remove html tags $msg =~ s/<[^>]+?>//g; # Decode html entities diff -ur PerlMonksModules/PerlMonks/Users.pm PerlMonksModules.new/Perl +Monks/Users.pm --- PerlMonksModules/PerlMonks/Users.pm Mon Aug 19 12:39:56 2002 +++ PerlMonksModules.new/PerlMonks/Users.pm Sat Aug 24 01:16:15 20 +02 @@ -63,7 +63,7 @@ my $self=shift; if ( (time() - $self->{cache_users_ts}) > USERS_REFRESH) { if (my $c=$self->getpage(USERS_URL)) { - my %users=($c=~/user\s+username="([^\"]+)"\s+user_id="(\d+)"/g) +; + my %users=reverse ($c=~/user\s+user_id="(\d+)"\s+username="([^\ +"]+)"/g); $self->{cache_users}=\%users; $self->{cache_users_ts}=time(); }

How can I visualize my complex data structure?
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-12-06 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (44 votes). Check out past polls.