From 91a7cda256e99efc6b6c285b512285ec262e95d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 4 Dec 2011 22:57:15 +0100 Subject: [PATCH] Show "Information" instead of username in information messages --- file/lib/data/chat/message/ChatMessage.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file/lib/data/chat/message/ChatMessage.class.php b/file/lib/data/chat/message/ChatMessage.class.php index 564a1cf..2e245bd 100644 --- a/file/lib/data/chat/message/ChatMessage.class.php +++ b/file/lib/data/chat/message/ChatMessage.class.php @@ -66,6 +66,8 @@ public function getFormattedMessage() { * @return string */ public function getFormattedUsername() { + if ($this->type == self::TYPE_INFORMATION) return ''.WCF::getLanguage()->get('wcf.chat.information').''; + $string = str_split($this->username); $r = (int) (($this->color1 >> 16 & 255) - ($this->color2 >> 16 & 255)) / (count($string) - 1); $g = (int) (($this->color1 >> 8 & 255) - ($this->color2 >> 8 & 255)) / (count($string) - 1);