The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Perl Code
Posted by: bdog | January 13, 2011 @ 12:49am
Perl Code
[
Download
]
#!/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 { return %PLUGIN_INFO; } sub plugin_load { my $plugin = shift; my $jabber = Purple::Find::prpl("prpl-jabber"); Purple::Signal::connect($jabber, "jabber-sending-xmlnode", $plugin, \&jabber_sending_xmlnode_cb, "unused userdata"); } sub plugin_unload { my $plugin = shift; } sub jabber_sending_xmlnode_cb { my ($connection, $xmlnode, $userdata) = @_; my $c = $xmlnode->get_child("c"); if (not defined($c)) { return; } my $ext = $c->get_attrib("ext"); if (not defined($c)) { $ext = ""; } $c->set_attrib("ext", $ext . " sms-v1"); $_[1] = $xmlnode; }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.52 / 8
75 Votes
http://codebin.yi.org/1061
page generated in 0.01 seconds