view gaim2blt.pl @ 4829:e7e45cee4265

[gaim-migrate @ 5154] This does 3 things: 1) Removes the "Get Capabilities" option which I re-added a few hours ago. We decided that it's pointless, since caps are in the tooltips. It also needlessly complicates things. 2) Adds an "unable to add this buddy because you are over the limit" message that is currently commented out. We have some sort of a message like this right now, but it's less good. If you really want to know why, ask me. 3) Adds a workaround for the bug where some users tooltips do not show capabilities sometimes. This is really an AIM bug, honest. Gaim is getting status updates for people that don't contain their capabilities. I guess it's probably intentional. I imagine it saves a bit o' bandwidth, since each capability is 16 bytes. [Insert humorous phrase or catch song lyric here] committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 19 Mar 2003 02:52:42 +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