1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Change username on error-type as well

This commit is contained in:
Tim Düsterhus 2011-12-27 14:09:29 +01:00
parent a2638046eb
commit bb50e76463

View File

@ -72,7 +72,7 @@ public function getFormattedMessage() {
public function getFormattedUsername() { public function getFormattedUsername() {
$username = $this->getUsername(); $username = $this->getUsername();
if ($this->type != self::TYPE_INFORMATION) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2); if ($this->type != self::TYPE_INFORMATION && $this->type != self::TYPE_ERROR) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2);
return '<strong>'.$username.'</strong>'; return '<strong>'.$username.'</strong>';
} }
@ -84,6 +84,8 @@ public function getFormattedUsername() {
*/ */
public function getUsername() { public function getUsername() {
if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('wcf.chat.information'); if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('wcf.chat.information');
if ($this->type == self::ERROR) return WCF::getLanguage()->get('wcf.chat.error');
return $this->username; return $this->username;
} }