view gaim2blt.pl @ 8998:3738d1eac0ad

[gaim-migrate @ 9773] " This patch completes the removal of the Show joins/leaves in chats preferences It also (temporarily?) brings back the UI for the IM/Chat buttons preferences by changing #if 0 to #if 1 so they're still easy to identify to revist later on. The "Individual log file for each buddy's signons" pref became obsolete a while ago and was incorrectly #if'd out with a prefslash04 label. This patch completes it's death. With this patch applied the only prefslash thing that should block release is the custom font/color/size/etc stuff, I think we need to work out what to do there. There's a bit of whitespace cleanup too." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 21 May 2004 14:26:31 +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