forked from GNUsocial/gnu-social
enqueue_outgoing_raw -> enqueueOutgoingRaw
This commit is contained in:
parent
b05ab5fc85
commit
e7a026091c
@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
* 2) override handleInput() with what to do when data is waiting on
|
||||
* one of the sockets
|
||||
* 3) override idle($timeout) to do keepalives (if necessary)
|
||||
* 4) implement send_raw_message() to send raw data that ImPlugin::enqueue_outgoing_raw
|
||||
* 4) implement send_raw_message() to send raw data that ImPlugin::enqueueOutgoingRaw
|
||||
* enqueued
|
||||
*/
|
||||
|
||||
|
@ -79,7 +79,7 @@ abstract class ImPlugin extends Plugin
|
||||
/**
|
||||
* send a single notice to a given screenname
|
||||
* The implementation should put raw data, ready to send, into the outgoing
|
||||
* queue using enqueue_outgoing_raw()
|
||||
* queue using enqueueOutgoingRaw()
|
||||
*
|
||||
* @param string $screenname screenname to send to
|
||||
* @param Notice $notice notice to send
|
||||
@ -94,7 +94,7 @@ abstract class ImPlugin extends Plugin
|
||||
/**
|
||||
* send a message (text) to a given screenname
|
||||
* The implementation should put raw data, ready to send, into the outgoing
|
||||
* queue using enqueue_outgoing_raw()
|
||||
* queue using enqueueOutgoingRaw()
|
||||
*
|
||||
* @param string $screenname screenname to send to
|
||||
* @param Notice $body text to send
|
||||
@ -144,7 +144,7 @@ abstract class ImPlugin extends Plugin
|
||||
*
|
||||
* @param object $data
|
||||
*/
|
||||
function enqueue_outgoing_raw($data)
|
||||
function enqueueOutgoingRaw($data)
|
||||
{
|
||||
$qm = QueueManager::get();
|
||||
$qm->enqueue($data, $this->transport . '-out');
|
||||
|
@ -122,7 +122,7 @@ class AimPlugin extends ImPlugin
|
||||
function sendMessage($screenname, $body)
|
||||
{
|
||||
$this->fake_aim->sendIm($screenname, $body);
|
||||
$this->enqueue_outgoing_raw($this->fake_aim->would_be_sent);
|
||||
$this->enqueueOutgoingRaw($this->fake_aim->would_be_sent);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ class IrcPlugin extends ImPlugin {
|
||||
$lines = explode("\n", $body);
|
||||
foreach ($lines as $line) {
|
||||
$this->fake_irc->doPrivmsg($screenname, $line);
|
||||
$this->enqueue_outgoing_raw(array('type' => 'message', 'prioritise' => 0, 'data' => $this->fake_irc->would_be_sent));
|
||||
$this->enqueueOutgoingRaw(array('type' => 'message', 'prioritise' => 0, 'data' => $this->fake_irc->would_be_sent));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -316,7 +316,7 @@ class IrcPlugin extends ImPlugin {
|
||||
*/
|
||||
public function checked_send_confirmation_code($screenname, $code, $user) {
|
||||
$this->fake_irc->doPrivmsg('NickServ', 'INFO '.$screenname);
|
||||
$this->enqueue_outgoing_raw(
|
||||
$this->enqueueOutgoingRaw(
|
||||
array(
|
||||
'type' => 'nickcheck',
|
||||
'prioritise' => 1,
|
||||
|
@ -162,7 +162,7 @@ class MsnPlugin extends ImPlugin {
|
||||
* @return boolean success value
|
||||
*/
|
||||
public function sendMessage($screenname, $body) {
|
||||
$this->enqueue_outgoing_raw(array('to' => $screenname, 'message' => $body));
|
||||
$this->enqueueOutgoingRaw(array('to' => $screenname, 'message' => $body));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ class Queued_XMPP extends XMPPHP_XMPP
|
||||
*/
|
||||
public function send($msg, $timeout=NULL)
|
||||
{
|
||||
$this->plugin->enqueue_outgoing_raw($msg);
|
||||
$this->plugin->enqueueOutgoingRaw($msg);
|
||||
}
|
||||
|
||||
//@{
|
||||
|
Loading…
Reference in New Issue
Block a user