Mercurial > pidgin
changeset 1686:73be09912842
[gaim-migrate @ 1696]
good fixes.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 05 Apr 2001 02:58:29 +0000 |
parents | e8e190793fe3 |
children | c9921a214121 |
files | gaim2blt.pl |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 (<FILE>) { 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"; }