# HG changeset patch # User Eric Warmenhoven # Date 986439509 0 # Node ID 73be09912842c17d344a08f1552b37aa242e3c77 # Parent e8e190793fe3d2c8e3c4ac98684b6a675f61e0c1 [gaim-migrate @ 1696] good fixes. committer: Tailor Script diff -r e8e190793fe3 -r 73be09912842 gaim2blt.pl --- a/gaim2blt.pl Thu Apr 05 02:40:23 2001 +0000 +++ b/gaim2blt.pl Thu Apr 05 02:58:29 2001 +0000 @@ -1,10 +1,10 @@ #!/usr/bin/perl ## gaim buddy list to aim blt format converter - +my $top = 1; if ($ARGV[0] && $ARGV[1]) { open (FILE,$ARGV[0]); - print "Config {\n version 1\n}\nUser {\n screename $ARGV[1]\n}\nBuddy {\n list {\n "; + print "Config {\n version 1\n}\nUser {\n screename $ARGV[1]\n}\nBuddy {\n list {\n"; foreach $line () { chomp ($line); $line =~ s/^ +//; ## strip any preceding spaces @@ -18,13 +18,15 @@ @screenname = split(/:/,$buddy); ## split off the aliases if ($line =~ /^g/) { - print " }\n $screenname[0] {\n"; + print " }\n" unless $top; + print " $screenname[0] {\n"; + $top = 0; } elsif ($line =~ /^b/) { print " $screenname[0]\n"; } $buddy = undef; } - print " }\n"; + print " }\n }\n}\n"; } else { print "\n\n\n\tExample:\n\n\t\tgaim2blt.pl gaim.buddy.file YourScreenName\n\n\n\n"; }