#!/usr/bin/perl -w
use strict;
use Purple;
our %PLUGIN_INFO = (
perl_api_version => 2,
name => "Google Talk SMS",
version => "0.2",
summary => "Enables Google Talk's SMS feature, which is normally restricted to official clients.",
description => "Works around Google Talk's restriction of its SMS feature to official clients by reporting that Pidgin supports the 'sms-v1' and 'sms-v2' XMPP capabilities (XEP-0115) extension.",
author => "Ryan Barrett <pidgin\@ryanb.org>",
url => "http://snarfed.org/space/google_talk_sms+pidgin+plugin",
load => "plugin_load",
unload => "plugin_unload"
);
sub plugin_init {
}
sub plugin_load {
my $jabber = Purple::Find::prpl("prpl-jabber");
Purple::
Signal::
connect($jabber,
"jabber-sending-xmlnode",
$plugin,
\&jabber_sending_xmlnode_cb, "unused userdata");
}
sub plugin_unload {
}
sub jabber_sending_xmlnode_cb {
my ($connection, $xmlnode, $userdata) = @_;
my $c = $xmlnode->get_child("c");
}
my $ext = $c->get_attrib("ext");
$ext = "";
}
$c->set_attrib("ext", $ext . " sms-v1");
$_[1] = $xmlnode;
}