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

Add CHAT_SKIP_ROOM_SELECT option

This commit is contained in:
Tim Düsterhus 2016-05-31 23:17:57 +02:00
parent fe0583566c
commit 238997ab0d
4 changed files with 16 additions and 7 deletions

View File

@ -8,7 +8,7 @@
* Shows the chat-interface * Shows the chat-interface
* *
* @author Tim Düsterhus * @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus * @copyright 2010-2016 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode> * @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package be.bastelstu.chat * @package be.bastelstu.chat
* @subpackage page * @subpackage page
@ -172,12 +172,12 @@ public function readRoom() {
$this->rooms = data\room\RoomCache::getInstance()->getRooms(); $this->rooms = data\room\RoomCache::getInstance()->getRooms();
if ($this->roomID === 0) { if ($this->roomID === 0) {
// no room given
if (CHAT_FORCE_ROOM_SELECT) {
$this->rooms = array_filter($this->rooms, function ($room) { $this->rooms = array_filter($this->rooms, function ($room) {
return $room->canEnter(); return $room->canEnter();
}); });
// no room given
if (CHAT_FORCE_ROOM_SELECT && !(CHAT_SKIP_ROOM_SELECT && count($this->rooms) == 1)) {
return; return;
} }
else { else {

View File

@ -113,6 +113,8 @@
<item name="wcf.acp.option.chat_command_aliases.description"><![CDATA[Geben Sie zeilenweise eine Kombination aus Alias und Zielbefehl an. Alias und Zielbefehl werden durch einen Doppelpunkt voneinander getrennt.]]></item> <item name="wcf.acp.option.chat_command_aliases.description"><![CDATA[Geben Sie zeilenweise eine Kombination aus Alias und Zielbefehl an. Alias und Zielbefehl werden durch einen Doppelpunkt voneinander getrennt.]]></item>
<item name="wcf.acp.option.chat_force_room_select"><![CDATA[Raumauswahl anzeigen]]></item> <item name="wcf.acp.option.chat_force_room_select"><![CDATA[Raumauswahl anzeigen]]></item>
<item name="wcf.acp.option.chat_force_room_select.description"><![CDATA[Zeigt eine Auswahl der verfügbaren Räume an, anstatt den ersten verfügbaren Raum zu betreten.]]></item> <item name="wcf.acp.option.chat_force_room_select.description"><![CDATA[Zeigt eine Auswahl der verfügbaren Räume an, anstatt den ersten verfügbaren Raum zu betreten.]]></item>
<item name="wcf.acp.option.chat_skip_room_select"><![CDATA[Raumauswahl überspringen]]></item>
<item name="wcf.acp.option.chat_skip_room_select.description"><![CDATA[Überspringt die Raumauswahl, wennn nur ein Chatraum zur Verfügung steht.]]></item>
<item name="wcf.acp.option.chat_enable_menu_badge"><![CDATA[Chatter im Hauptmenü]]></item> <item name="wcf.acp.option.chat_enable_menu_badge"><![CDATA[Chatter im Hauptmenü]]></item>
<item name="wcf.acp.option.chat_enable_menu_badge.description"><![CDATA[Zeigt die Anzahl der Chatter als Badge im Hauptmenü an.]]></item> <item name="wcf.acp.option.chat_enable_menu_badge.description"><![CDATA[Zeigt die Anzahl der Chatter als Badge im Hauptmenü an.]]></item>

View File

@ -113,6 +113,8 @@
<item name="wcf.acp.option.chat_command_aliases.description"><![CDATA[Enter a combination of alias and target separated by newlines. Alias and target are separated by colons.]]></item> <item name="wcf.acp.option.chat_command_aliases.description"><![CDATA[Enter a combination of alias and target separated by newlines. Alias and target are separated by colons.]]></item>
<item name="wcf.acp.option.chat_force_room_select"><![CDATA[Show Room Selection]]></item> <item name="wcf.acp.option.chat_force_room_select"><![CDATA[Show Room Selection]]></item>
<item name="wcf.acp.option.chat_force_room_select.description"><![CDATA[Shows a list of available rooms instead of joining the first available one.]]></item> <item name="wcf.acp.option.chat_force_room_select.description"><![CDATA[Shows a list of available rooms instead of joining the first available one.]]></item>
<item name="wcf.acp.option.chat_skip_room_select"><![CDATA[Skip Room Selection]]></item>
<item name="wcf.acp.option.chat_skip_room_select.description"><![CDATA[Skips the room selection if only one chat room is available.]]></item>
<item name="wcf.acp.option.chat_enable_menu_badge"><![CDATA[Chatter Count in main menu]]></item> <item name="wcf.acp.option.chat_enable_menu_badge"><![CDATA[Chatter Count in main menu]]></item>
<item name="wcf.acp.option.chat_enable_menu_badge.description"><![CDATA[Shows the number of active chatters as a badge in the main menu.]]></item> <item name="wcf.acp.option.chat_enable_menu_badge.description"><![CDATA[Shows the number of active chatters as a badge in the main menu.]]></item>

View File

@ -22,7 +22,12 @@
<categoryname>chat.general</categoryname> <categoryname>chat.general</categoryname>
<optiontype>boolean</optiontype> <optiontype>boolean</optiontype>
<defaultvalue>1</defaultvalue> <defaultvalue>1</defaultvalue>
<enableoptions>chat_enable_menu_badge</enableoptions> <enableoptions>chat_enable_menu_badge,chat_skip_room_select</enableoptions>
</option>
<option name="chat_skip_room_select">
<categoryname>chat.general</categoryname>
<optiontype>boolean</optiontype>
<defaultvalue>0</defaultvalue>
</option> </option>
<option name="chat_enable_menu_badge"> <option name="chat_enable_menu_badge">
<categoryname>chat.general</categoryname> <categoryname>chat.general</categoryname>