From ae32b770a71d1546b8a84b8f0db60a51715ae2aa Mon Sep 17 00:00:00 2001 From: askmeaboutloom Date: Sun, 22 Dec 2024 12:28:51 +0100 Subject: [PATCH] Allow authOnly option in session templates To allow only registered users in a session. --- ChangeLog | 1 + src/thinsrv/templatefiles.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9e6121332..cd5ae85a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,7 @@ Unreleased Version 2.2.2-pre * Server Feature: Treat invalid password and opword hashes in session templates as plain passwords. This still issues a warning, since those kinds of passwords should really be specified by prefixing them with "plain;". * Server Fix: Make template sessions not appear with a blank title and settings when first joining them. * Server Fix: Properly include web socket allowance in template session listings. + * Server Feature: Allow authOnly option in session templates. 2024-11-06 Version 2.2.2-beta.4 * Fix: Solve rendering glitches with selection outlines that happen on some systems. Thanks xxxx for reporting. diff --git a/src/thinsrv/templatefiles.cpp b/src/thinsrv/templatefiles.cpp index d1356e419..987be974c 100644 --- a/src/thinsrv/templatefiles.cpp +++ b/src/thinsrv/templatefiles.cpp @@ -157,6 +157,7 @@ QJsonObject TemplateFiles::templateFileDescription( {"hasPassword", !getHeaderString(header, "password").isEmpty()}, {"title", getHeaderString(header, "title")}, {"nsfm", getHeaderBool(header, "nsfm")}, + {"authOnly", getHeaderBool(header, "authOnly")}, {"allowWeb", getHeaderBool(header, "allowWeb")}, }; @@ -239,6 +240,8 @@ bool TemplateFiles::init(SessionHistory *session) const flags |= SessionHistory::PreserveChat; if(getHeaderBool(header, "deputies")) flags |= SessionHistory::Deputies; + if(getHeaderBool(header, "authOnly")) + flags |= SessionHistory::AuthOnly; if(getHeaderBool(header, "idleOverride")) flags |= SessionHistory::IdleOverride; if(getHeaderBool(header, "allowWeb"))