Mercurial > pidgin
view gaim2blt.pl @ 7806:c86f075b269a
[gaim-migrate @ 8453]
I modified some of the libfaim connection stuff. I dunno, it seems
cleaner this way. I like to be comfortable with what's going on.
It's possible that FT and DC won't work now (although, they should),
but I'll get to making them suck less pretty soon.
Also upgraded the Doxyfile to 1 version newer. It mostly just moved
some things around, but also removed the CGI_BLEH lines from the end.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 08 Dec 2003 05:41:04 +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