Xadras / stasiscl

Automatically exported from code.google.com/p/stasiscl
0 stars 0 forks source link

Suggestion for non US armory links #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I suggest you this very simple modification to manage non-US armory links:

in lib/Stasis/Page/Actor.pm, line 245:
    if( $self->{server} && $self->{raid}{$MOB}{class} && $self-
>{raid}{$MOB}{class} ne "Pet" ) {
        my $r = $self->{server};
        my $z = "www";
        if ($r =~ /^(.+)!(.+)$/) { $z = $1; $r = $2 }
        my $n = $self->{ext}{Index}->actorname($MOB);
        $r =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
        $n =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
        push @summaryRows, "Armory" => "<a 
href=\"http://$z.wowarmory.com/character-sheet.xml?r=$r&n=$n\" 
target=\"swsar_$n\">$displayName &#187;</a>";
    }

Non-US players should enter -server eu!Eitrigg for example.

Same thing with wowhead links.

I admit that too many commandline options is not recommendable, maybe an 
optional statis.conf file for these static parameters ?

Regards,

Original issue reported on code.google.com by hati.elune@gmail.com on 2 Feb 2009 at 9:10

GoogleCodeExporter commented 9 years ago
Sounds like a good idea.

Original comment by gianmerlino@gmail.com on 4 Feb 2009 at 6:36