Skip to content

Commit

Permalink
Allow authOnly option in session templates
Browse files Browse the repository at this point in the history
To allow only registered users in a session.
  • Loading branch information
askmeaboutlo0m committed Dec 22, 2024
1 parent 9e149c8 commit ae32b77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions src/thinsrv/templatefiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")},
};

Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit ae32b77

Please sign in to comment.