view gaim2blt.pl @ 9077:13e809489beb

[gaim-migrate @ 9853] nosnilmot found that there continued to be bugs in our linkification on yahoo (and probably msn). He wrote: "Tim, Something's still not quite right, this is on Yahoo - insert link -> http://www.google.com/ -> send (the signals-test plugin is quite useful here!) - nested links now instead of duplicate links: (07:12:48) signals test: writing-im-msg (nosnilmot26, nosnilmot26, <a href="http://www.google.com/"><A HREF="http://www.google.com/">http://www.google.com/</A></a>) Anyway, that problem is NOT in imhtml, so I managed to do something about it - gaim_markup_linkify was never actually detecting the "<A" tag because it was an else-if on checking for "<". The patch attached fixes that so gaim_markup_linkify will not try to linkify stuff that's already inside a link Regards, Stu." committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 26 May 2004 23:24:44 +0000
parents 66bf7ecefedd
children
line wrap: on
line source

#!/usr/bin/perl -w
# Original by Andy Harrison,
# Rewrite by Decklin Foster,
# Available under the GPL.

package Gaim2Blt;
use strict;
use Getopt::Std;
use vars qw(%opts $in_group);

getopts('s:', \%opts);
die "usage: $0 -s 'screen name' gaim.buddy\n" unless $opts{s};

print <<"EOF";
Config {
  version 1
}
User {
  screenname "$opts{s}"
}
Buddy {
  list {
EOF

while (<>) {
    chomp;
    my ($type, $args) = split ' ', $_, 2;
    next unless $type;

    if ($type eq 'g') {
        print "    }\n" if ($in_group);
        print qq(    "$args" {\n);
        $in_group = 1;
    } elsif ($type eq 'b') {
        my ($buddy, $alias) = split /:/, $args;
        print qq(      "$buddy"\n);
    }
}

print <<"EOF";
    }
  }
}
EOF