view gaim2blt.pl @ 6847:7de1b559cbbb

[gaim-migrate @ 7392] Tim Ringenbach (marv_sf) writes: " This fixes a bug where SMS users who aren't anymore would still be. It also truncates status message for the yahoo server, because for some reason if it has to do it itself, it clears the away flag. Finally, it tries to do (our) statuses and idleness better. I think we're now sending the right thing in the regard now (as opposed to before, when we didn't bother letting the server know we were idle if we were also in a predefined status). For some reason we still don't show as idle on our own list while in those states, but i think that's a seperate bug in process status that i need to look into." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 15 Sep 2003 13:29:22 +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