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/imsenderqueuehandler.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/imsenderqueuehandler.php (limited to 'lib/imsenderqueuehandler.php') diff --git a/lib/imsenderqueuehandler.php b/lib/imsenderqueuehandler.php new file mode 100644 index 000000000..3dd96ff73 --- /dev/null +++ b/lib/imsenderqueuehandler.php @@ -0,0 +1,44 @@ +. + */ + +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } + +/** + * Common superclass for all IM sending queue handlers. + */ + +class ImSenderQueueHandler extends QueueHandler +{ + function __construct($plugin, $immanager) + { + $this->plugin = $plugin; + $this->immanager = $immanager; + } + + /** + * Handle outgoing IM data to be sent from the bot to a user + * @param object $data + * @return boolean success + */ + function handle($data) + { + return $this->immanager->send_raw_message($data); + } +} + -- cgit v1.2.3-54-g00ecf