From 8592826b7150917d3ca8e548087adf7362de9bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 24 Mar 2012 22:03:04 +0100 Subject: [PATCH] Added more information in /info --- .../system/chat/commands/commands/Info.class.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/file/lib/system/chat/commands/commands/Info.class.php b/file/lib/system/chat/commands/commands/Info.class.php index 66509ac..cdd670c 100644 --- a/file/lib/system/chat/commands/commands/Info.class.php +++ b/file/lib/system/chat/commands/commands/Info.class.php @@ -1,6 +1,7 @@ getParameters(), ',')); if (!$user->userID) throw new \wcf\system\chat\commands\UserNotFoundException(rtrim($commandHandler->getParameters(), ',')); - $color = \wcf\util\ChatUtil::readUserData('color', $user); - $this->lines[WCF::getLanguage()->get('wcf.user.username')] = \wcf\util\ChatUtil::gradient($user->username, $color[1], $color[2]); + $room = new \wcf\data\chat\room\ChatRoom(ChatUtil::readUserData('roomID', $user)); + $color = ChatUtil::readUserData('color', $user); + + $this->lines[WCF::getLanguage()->get('wcf.user.username')] = ChatUtil::gradient($user->username, $color[1], $color[2]); + if (ChatUtil::readUserData('away', $user) !== null) { + $this->lines[WCF::getLanguage()->get('wcf.chat.away')] = ChatUtil::readUserData('away', $user); + } + if ($room->roomID && $room->canEnter()) { + $this->lines[WCF::getLanguage()->get('wcf.chat.room')] = $room->getTitle(); + } } /**