view gaim2blt.pl @ 6578:1dc3eac729d1

[gaim-migrate @ 7100] (20:21:09) Robot101: someone remove line 1097 and 1098 of server.c, and put the c = gaim_find_conversation two blocks down, after the existing (!b) conditional. (20:21:20) LSchiere: what does that do? (20:22:04) Robot101: fixes the null buddy dereferencing bug without duplicated check for (!b) (20:22:21) LSchiere: what null buddy dereferencing bug? (20:22:35) ***LSchiere goes to find the code in question (20:22:39) Robot101: the one faceprint fixed on Thursday (20:22:44) LSchiere: ah (20:22:47) Robot101: by adding a check that was already there a few lines down committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 23 Aug 2003 00:23:51 +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