view gaim2blt.pl @ 8378:2b68c423357e

[gaim-migrate @ 9105] " For people and systems which have libzephyr installed (e.g Debian), this will allow the zephyr plugin to optionally be linked against it, instead of building and linking in the libzephyr that comes with gaim. Why? 1) A gaim binary package can be compiled against a locally installed libzephyr.a, and use either unkerberized or kerberized zephyr depending on which version of the zephyr shared libraries is installed. 2) It reduces the build speed and size of the zephyr plugin (on Debian x86, from 6.5 MB to ~ 300 kb) Also, I added a zephyr icon (a blue Z), that's similar to the icons used by Windows and MacOS zephyr clients at MIT." --Arun A Tharuvai someone will have to tell me how to fix the win32 makefiles, and i'm not sure he patched enough to get his icon to be actually used. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 01 Mar 2004 18:08: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