view gaim2blt.pl @ 8533:ef3d81aa663a

[gaim-migrate @ 9272] " This patch marks up outgoing links in Yahoo so that the URL is linked instead of the description (as was happening before). It sort-of fixes SimGuy bug #24 - not by disabling the insert link button, but by formatting links such that the link is usable by the recipient. A GAIM_CONNECTION_NO_URLDESCRIPTION connection flag might be useful so we don't bother asking for a description if the protocol (eg. MSN, Yahoo & Zephyr) doesn't support it in links, but I'll leave that for another day, another patch." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 31 Mar 2004 03:10:37 +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