From 5efe588174c71979fc1970353c9a556ea441f138 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 26 Aug 2009 00:59:06 +0000 Subject: Moved the rest of the Twitter stuff into the TwitterBridge plugin --- .../TwitterBridge/daemons/twitterqueuehandler.php | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 plugins/TwitterBridge/daemons/twitterqueuehandler.php (limited to 'plugins/TwitterBridge/daemons/twitterqueuehandler.php') diff --git a/plugins/TwitterBridge/daemons/twitterqueuehandler.php b/plugins/TwitterBridge/daemons/twitterqueuehandler.php new file mode 100755 index 000000000..9aa9d1ed0 --- /dev/null +++ b/plugins/TwitterBridge/daemons/twitterqueuehandler.php @@ -0,0 +1,73 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); + +$shortoptions = 'i::'; +$longoptions = array('id::'); + +$helptext = <<log(LOG_INFO, "INITIALIZE"); + return true; + } + + function handle_notice($notice) + { + return broadcast_twitter($notice); + } + + function finish() + { + } + +} + +if (have_option('i')) { + $id = get_option_value('i'); +} else if (have_option('--id')) { + $id = get_option_value('--id'); +} else if (count($args) > 0) { + $id = $args[0]; +} else { + $id = null; +} + +$handler = new TwitterQueueHandler($id); + +$handler->runOnce(); -- cgit v1.2.3-54-g00ecf