Updating slow mode duration on existing rooms when changing channel options (related to #332).

This commit is contained in:
John Livingston
2024-03-07 17:33:18 +01:00
parent 08b84899f6
commit e67b21dd9f
5 changed files with 48 additions and 9 deletions

View File

@ -83,6 +83,12 @@ local function update_room(event)
must104 = true;
end
end
if type(config.slow_mode_duration) == "number" then
if room._data.slow_mode_duration ~= config.slow_mode_duration then
room._data.slow_mode_duration = config.slow_mode_duration;
must104 = true;
end
end
if must104 then
-- we must broadcast a status 104 message, so that clients can update room info