Revision 22057,
728 bytes
checked in by ghudson, 19 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r22056,
which included commits to RCS files with non-trunk default branches.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/usr/bin/perl -w |
---|
2 | # Original by Andy Harrison, |
---|
3 | # Rewrite by Decklin Foster, |
---|
4 | # Available under the GPL. |
---|
5 | |
---|
6 | package Gaim2Blt; |
---|
7 | use strict; |
---|
8 | use Getopt::Std; |
---|
9 | use vars qw(%opts $in_group); |
---|
10 | |
---|
11 | getopts('s:', \%opts); |
---|
12 | die "usage: $0 -s 'screen name' gaim.buddy\n" unless $opts{s}; |
---|
13 | |
---|
14 | print <<"EOF"; |
---|
15 | Config { |
---|
16 | version 1 |
---|
17 | } |
---|
18 | User { |
---|
19 | screenname "$opts{s}" |
---|
20 | } |
---|
21 | Buddy { |
---|
22 | list { |
---|
23 | EOF |
---|
24 | |
---|
25 | while (<>) { |
---|
26 | chomp; |
---|
27 | my ($type, $args) = split ' ', $_, 2; |
---|
28 | next unless $type; |
---|
29 | |
---|
30 | if ($type eq 'g') { |
---|
31 | print " }\n" if ($in_group); |
---|
32 | print qq( "$args" {\n); |
---|
33 | $in_group = 1; |
---|
34 | } elsif ($type eq 'b') { |
---|
35 | my ($buddy, $alias) = split /:/, $args; |
---|
36 | print qq( "$buddy"\n); |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | print <<"EOF"; |
---|
41 | } |
---|
42 | } |
---|
43 | } |
---|
44 | EOF |
---|
Note: See
TracBrowser
for help on using the repository browser.