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

Show "Information" instead of username in information messages

This commit is contained in:
Tim Düsterhus 2011-12-04 22:57:15 +01:00
parent cc38d47c7d
commit 91a7cda256

View File

@ -66,6 +66,8 @@ public function getFormattedMessage() {
* @return string
*/
public function getFormattedUsername() {
if ($this->type == self::TYPE_INFORMATION) return '<strong>'.WCF::getLanguage()->get('wcf.chat.information').'</strong>';
$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);