mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Added more information in /info
This commit is contained in:
parent
07d8716c45
commit
8592826b71
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace wcf\system\chat\commands\commands;
|
namespace wcf\system\chat\commands\commands;
|
||||||
use \wcf\system\WCF;
|
use \wcf\system\WCF;
|
||||||
|
use \wcf\util\ChatUtil;
|
||||||
use \wcf\util\StringUtil;
|
use \wcf\util\StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,8 +23,16 @@ public function __construct(\wcf\system\chat\commands\CommandHandler $commandHan
|
|||||||
|
|
||||||
$user = \wcf\data\user\User::getUserByUsername(rtrim($commandHandler->getParameters(), ','));
|
$user = \wcf\data\user\User::getUserByUsername(rtrim($commandHandler->getParameters(), ','));
|
||||||
if (!$user->userID) throw new \wcf\system\chat\commands\UserNotFoundException(rtrim($commandHandler->getParameters(), ','));
|
if (!$user->userID) throw new \wcf\system\chat\commands\UserNotFoundException(rtrim($commandHandler->getParameters(), ','));
|
||||||
$color = \wcf\util\ChatUtil::readUserData('color', $user);
|
$room = new \wcf\data\chat\room\ChatRoom(ChatUtil::readUserData('roomID', $user));
|
||||||
$this->lines[WCF::getLanguage()->get('wcf.user.username')] = \wcf\util\ChatUtil::gradient($user->username, $color[1], $color[2]);
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user