Mercurial > pidgin
view gaim2blt.pl @ 8982:a4fd6666bb83
[gaim-migrate @ 9757]
Some Direct IM fixes.
1. Let's send our correct ip. We were usually sending localhost, so the
other side would try to connect to localhost and immediately fail and so
say, hey! I can't connect to you! Connect to me instead!
2. Add some gaim_conversation_writes to keep the user more informed as
to what's going on.
This changes the libfaim API. libfaim users take note.
I removed the util get local ip function, and made the function
that used to use it take an ip as an argument instead, so that oscar.c
could just call gaim's function, which works better.
I also made it possible to specify a cookie to use, because I think I'll
need that later. Probably.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Thu, 20 May 2004 00:14:14 +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