send_message -> sendMessage

This commit is contained in:
Craig Andrews 2010-08-31 00:01:55 -04:00
parent 326258bfef
commit 6a848bcc8a
9 changed files with 16 additions and 16 deletions

View File

@ -47,7 +47,7 @@ class IMChannel extends Channel
function output($user, $text)
{
$text = '['.common_config('site', 'name') . '] ' . $text;
$this->imPlugin->send_message($this->imPlugin->get_screenname($user), $text);
$this->imPlugin->sendMessage($this->imPlugin->get_screenname($user), $text);
}
function error($user, $text)
@ -56,7 +56,7 @@ class IMChannel extends Channel
$screenname = $this->imPlugin->get_screenname($user);
if($screenname){
$this->imPlugin->send_message($screenname, $text);
$this->imPlugin->sendMessage($screenname, $text);
return true;
}else{
common_log(LOG_ERR,

View File

@ -88,7 +88,7 @@ abstract class ImPlugin extends Plugin
*/
function send_notice($screenname, $notice)
{
return $this->send_message($screenname, $this->format_notice($notice));
return $this->sendMessage($screenname, $this->format_notice($notice));
}
/**
@ -101,7 +101,7 @@ abstract class ImPlugin extends Plugin
*
* @return boolean success value
*/
abstract function send_message($screenname, $body);
abstract function sendMessage($screenname, $body);
/**
* receive a raw message
@ -249,7 +249,7 @@ abstract class ImPlugin extends Plugin
protected function send_from_site($screenname, $msg)
{
$text = '['.common_config('site', 'name') . '] ' . $msg;
$this->send_message($screenname, $text);
$this->sendMessage($screenname, $text);
}
/**
@ -271,7 +271,7 @@ abstract class ImPlugin extends Plugin
'or if you didn\'t request this confirmation, just ignore this message.'),
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
return $this->send_message($screenname, $body);
return $this->sendMessage($screenname, $body);
}
/**

View File

@ -119,7 +119,7 @@ class AimPlugin extends ImPlugin
return 'aim:' . $screenname;
}
function send_message($screenname, $body)
function sendMessage($screenname, $body)
{
$this->fake_aim->sendIm($screenname, $body);
$this->enqueue_outgoing_raw($this->fake_aim->would_be_sent);

View File

@ -56,6 +56,6 @@ class ChannelResponseChannel extends IMChannel {
*/
public function output($user, $text) {
$text = $user->nickname.': ['.common_config('site', 'name') . '] ' . $text;
$this->imPlugin->send_message($this->ircChannel, $text);
$this->imPlugin->sendMessage($this->ircChannel, $text);
}
}

View File

@ -189,7 +189,7 @@ class IrcPlugin extends ImPlugin {
* @param string $body Text to send
* @return boolean true on success
*/
public function send_message($screenname, $body) {
public function sendMessage($screenname, $body) {
$lines = explode("\n", $body);
foreach ($lines as $line) {
$this->fake_irc->doPrivmsg($screenname, $line);
@ -301,7 +301,7 @@ class IrcPlugin extends ImPlugin {
if ($this->regcheck && !$checked) {
return $this->checked_send_confirmation_code($screenname, $code, $user);
} else {
return $this->send_message($screenname, $body);
return $this->sendMessage($screenname, $body);
}
}

View File

@ -231,7 +231,7 @@ class IrcManager extends ImManager {
// Send message
$this->plugin->send_confirmation_code($screenname, $nickdata['code'], $nickdata['user'], true);
} else {
$this->plugin->send_message($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled'));
$this->plugin->sendMessage($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled'));
$confirm = new Confirm_address();

View File

@ -161,7 +161,7 @@ class MsnPlugin extends ImPlugin {
* @param string $body Text to send
* @return boolean success value
*/
public function send_message($screenname, $body) {
public function sendMessage($screenname, $body) {
$this->enqueue_outgoing_raw(array('to' => $screenname, 'message' => $body));
return true;
}

View File

@ -175,10 +175,10 @@ class MsnManager extends ImManager {
$wm = Msn_waiting_message::top($data['to']);
while ($wm != NULL) {
if ($sessionFailed) {
$this->plugin->send_message($wm->screenname, $wm->message);
$this->plugin->sendMessage($wm->screenname, $wm->message);
$sessionFailed = true;
} elseif (!$this->conn->sendMessage($wm->screenname, $wm->message, $ignore)) {
$this->plugin->send_message($wm->screenname, $wm->message);
$this->plugin->sendMessage($wm->screenname, $wm->message);
}
$wm->delete();
@ -195,7 +195,7 @@ class MsnManager extends ImManager {
protected function requeue_waiting_messages() {
$wm = Msn_waiting_message::top();
while ($wm != NULL) {
$this->plugin->send_message($wm->screenname, $wm->message);
$this->plugin->sendMessage($wm->screenname, $wm->message);
$wm->delete();
$wm = Msn_waiting_message::top();
}

View File

@ -311,7 +311,7 @@ class XmppPlugin extends ImPlugin
return 'xmpp:' . $screenname;
}
function send_message($screenname, $body)
function sendMessage($screenname, $body)
{
$this->queuedConnection()->message($screenname, $body, 'chat');
}