view gaim2blt.pl @ 3595:1e60a05c7482

[gaim-migrate @ 3697] This adds le non-direct connect typing notification for oscar. How it works, in a nutshell: -AIM servers append a flag telling remote clients you support typing notification -You tell the AIM servers you support typing notification when you sign on (by changing the "flags" passed to aim_seticbmparam()) -Clients send little typing notification messages to other clients, but only when they know that the other client supports it (so after you've received an IM from the other person) I also fixed a compile warning or two dealing with SSI stuff. Things to look out for: -ICQ states doing weird things -Typing notification works with MacAIM clients (iChat and the official one) -Typing notification doesn't try to send stuff to clients that don't support (I have no idea how you're supposed to look out for this. It should be ok) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 06 Oct 2002 03:08:47 +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