summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-10-04 13:03:42 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-10-04 13:03:42 -0400
commit46b96887e614e65a3bd10893fb17c4f76b58d6e0 (patch)
treef5b02f03768ff4990f36dede24d2f44da8993804
parentbdeba50c3488cfd79231eef319d5b3f17d486aea (diff)
correct use of $user to $this->user
darcs-hash:20081004170342-5ed1f-f4b4656d765c67cf95ca3a9193ff64e3220c1526.gz
-rw-r--r--classes/Command.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/classes/Command.php b/classes/Command.php
index 3e2afec6c..265e70f0a 100644
--- a/classes/Command.php
+++ b/classes/Command.php
@@ -190,19 +190,19 @@ class MessageCommand extends Command {
$channel->error($this->user, _('No content!'));
return;
} else if ($len > 140) {
- $channel->error($this->user,sprintf(_('Message too long - maximum is 140 characters, you sent %d'), $len));
+ $channel->error($this->user, sprintf(_('Message too long - maximum is 140 characters, you sent %d'), $len));
return;
} else if (!$other) {
$channel->error($this->user, _('No such user.'));
return;
- } else if (!$user->mutuallySubscribed($other)) {
+ } else if (!$this->user->mutuallySubscribed($other)) {
$channel->error($this->user, _('You can\'t send a message to this user.'));
return;
- } else if ($user->id == $other->id) {
+ } else if ($this->user->id == $other->id) {
$channel->error($this->user, _('Don\'t send a message to yourself; just say it to yourself quietly instead.'));
return;
}
- $message = Message::saveNew($user->id, $other->id, $body, 'xmpp');
+ $message = Message::saveNew($this->user->id, $other->id, $body, 'xmpp');
if ($message) {
$channel->output($this->user, sprintf(_('Direct message to %s sent'), $this->other));
} else {
@@ -254,7 +254,7 @@ class SubCommand extends Command {
return;
}
- $result = subs_subscribe_user($user, $this->other);
+ $result = subs_subscribe_user($this->user, $this->other);
if ($result == 'true') {
$channel->output($this->user, sprintf(_('Subscribed to %s'), $this->other));
@@ -279,7 +279,7 @@ class UnsubCommand extends Command {
return;
}
- $result=subs_unsubscribe_user($user, $this->other);
+ $result=subs_unsubscribe_user($this->user, $this->other);
if ($result) {
$channel->output($this->user, sprintf(_('Unsubscribed from %s'), $this->other));