]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Command.php
Fix error when maildaemon tries to report a message parsing error
[quix0rs-gnu-social.git] / classes / Command.php
index e5dc59313d16edeee58d1136cf96076b06292a74..0795f86afbc12d6f16f75abddd1c609a8b4d8885 100644 (file)
@@ -228,8 +228,10 @@ class GetCommand extends Command {
        }
        
        function execute($channel) {
-               $target = 
-                 common_relative_profile($this->user, common_canonical_nickname($this->other));
+               $target_nickname = common_canonical_nickname($this->other);
+               
+               $target =
+                 common_relative_profile($this->user, $target_nickname);
 
                if (!$target) {
                        $channel->error($this->user, _('No such user.'));
@@ -241,6 +243,7 @@ class GetCommand extends Command {
                        return;
                }
                $notice_content = $notice->content;
+               
                $channel->output($this->user, $target_nickname . ": " . $notice_content);
        }
 }
@@ -307,9 +310,9 @@ class OffCommand extends Command {
                        $channel->error($this->user, _("Command not yet implemented."));
                } else {
                        if ($channel->off($this->user)) {
-                               $channel->output(_('Notification off.'));
+                               $channel->output($this->user, _('Notification off.'));
                        } else {
-                               $channel->error(_('Can\'t turn off notification.'));
+                               $channel->error($this->user, _('Can\'t turn off notification.'));
                        }
                }
        }
@@ -327,9 +330,9 @@ class OnCommand extends Command {
                        $channel->error($this->user, _("Command not yet implemented."));
                } else {
                        if ($channel->on($this->user)) {
-                               $channel->output(_('Notification on.'));
+                               $channel->output($this->user, _('Notification on.'));
                        } else {
-                               $channel->error(_('Can\'t turn on notification.'));
+                               $channel->error($this->user, _('Can\'t turn on notification.'));
                        }
                }
        }