Mercurial > pidgin.yaz
view gaim2blt.pl @ 4884:5496d1704ee0
[gaim-migrate @ 5214]
Aaron Namba (musicmanan) writes:
" I am using target i386-unknown-freebsd4.7 with perl
5.00503. I had to modify src/perl.c slightly to get it
libintl.a to link properly. I got this idea from
http://archive.develooper.com/perl-xs@perl.org/msg00773.html,
not sure whether it was the proper thing to do. But
gaim seems to work properly.
Here's the diff... "
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 25 Mar 2003 01:20:36 +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