From e9995b0f6ab0788162e22c996e5ee0af416dd519 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 23 Jan 2010 01:25:27 -0500 Subject: Create IM plugin, Pluginize XMPP, Create AIM plugin --- lib/imreceiverqueuehandler.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/imreceiverqueuehandler.php (limited to 'lib/imreceiverqueuehandler.php') diff --git a/lib/imreceiverqueuehandler.php b/lib/imreceiverqueuehandler.php new file mode 100644 index 000000000..269c7db91 --- /dev/null +++ b/lib/imreceiverqueuehandler.php @@ -0,0 +1,42 @@ +. + */ + +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } + +/** + * Common superclass for all IM receiving queue handlers. + */ + +class ImReceiverQueueHandler extends QueueHandler +{ + function __construct($plugin) + { + $this->plugin = $plugin; + } + + /** + * Handle incoming IM data sent by a user to the IM bot + * @param object $data + * @return boolean success + */ + function handle($data) + { + return $this->plugin->receive_raw_message($data); + } +} -- cgit v1.2.3-54-g00ecf