diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index d42fb9a..a495782 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -8,7 +8,7 @@ * Shows the chat-interface * * @author Tim Düsterhus - * @copyright 2010-2014 Tim Düsterhus + * @copyright 2010-2016 Tim Düsterhus * @license Creative Commons Attribution-NonCommercial-ShareAlike * @package be.bastelstu.chat * @subpackage page @@ -172,12 +172,12 @@ public function readRoom() { $this->rooms = data\room\RoomCache::getInstance()->getRooms(); if ($this->roomID === 0) { + $this->rooms = array_filter($this->rooms, function ($room) { + return $room->canEnter(); + }); + // no room given - if (CHAT_FORCE_ROOM_SELECT) { - $this->rooms = array_filter($this->rooms, function ($room) { - return $room->canEnter(); - }); - + if (CHAT_FORCE_ROOM_SELECT && !(CHAT_SKIP_ROOM_SELECT && count($this->rooms) == 1)) { return; } else { diff --git a/language/de.xml b/language/de.xml index 554fc5a..27457fc 100644 --- a/language/de.xml +++ b/language/de.xml @@ -113,6 +113,8 @@ + + diff --git a/language/en.xml b/language/en.xml index 339f2e2..4a29ec2 100644 --- a/language/en.xml +++ b/language/en.xml @@ -113,6 +113,8 @@ + + diff --git a/option.xml b/option.xml index 4ae6d39..d073e35 100644 --- a/option.xml +++ b/option.xml @@ -22,7 +22,12 @@ chat.general boolean 1 - chat_enable_menu_badge + chat_enable_menu_badge,chat_skip_room_select + +