pidgin: caa0ae30: Add timeout_add() example to the Perl si...
datallah at pidgin.im
datallah at pidgin.im
Thu Feb 18 14:35:44 EST 2010
-----------------------------------------------------------------
Revision: caa0ae301c89eeec679cba854aae8b0fa27970e5
Ancestor: 3b9d07ddf934dc6492290dc4d1dbd61564a548c4
Author: datallah at pidgin.im
Date: 2010-02-18T16:43:29
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/caa0ae301c89eeec679cba854aae8b0fa27970e5
Modified files:
libpurple/plugins/perl/scripts/signals-test.pl
ChangeLog:
Add timeout_add() example to the Perl signals-test plugin
-------------- next part --------------
============================================================
--- libpurple/plugins/perl/scripts/signals-test.pl b975b44819449421b5755371f278776990c404fa
+++ libpurple/plugins/perl/scripts/signals-test.pl 83115c1b6e18156610a648f2267a01fc56901b7a
@@ -44,6 +44,11 @@ sub conv_received_msg
Purple::Debug::misc("signals test in perl", "$data (" . $account->get_username() . ", $sender, $message, $flags)\n");
}
+sub timeout_cb
+{
+ Purple::Debug::misc("signals test in perl", "timeout elapsed\n");
+}
+
sub plugin_load
{
my $plugin = shift;
@@ -71,6 +76,9 @@ sub plugin_load
\&conv_received_msg, "received im message");
Purple::Signal::connect($conv, "received-chat-msg", $plugin,
\&conv_received_msg, "received chat message");
+
+
+ Purple::timeout_add($plugin, 10, \&timeout_cb);
}
sub plugin_unload
More information about the Commits
mailing list