Browse Source

csm{,_strict}: Leave the mod channel if disabled

master
luk3yx 1 month ago
parent
commit
61703b0645
2 changed files with 8 additions and 2 deletions
  1. 7
    1
      csm/init.lua
  2. 1
    1
      csm_strict/init.lua

+ 7
- 1
csm/init.lua View File

@@ -265,7 +265,13 @@ end)
-- Send "0"
local function request_csms(c)
c = c or 10
if c <= 0 then return end
if c <= 0 then
if mod_channel then
mod_channel:leave()
mod_channel = false
end
return
end
if minetest.localplayer and mod_channel:is_writeable() then
mod_channel:send_all('0')
else

+ 1
- 1
csm_strict/init.lua View File

@@ -340,7 +340,7 @@ end)
-- Send "0"
local function request_csms(c)
c = c or 10
if c <= 0 then return end
if c <= 0 then return leave_mod_channel() end
if minetest.localplayer and mod_channel:is_writeable() then
mod_channel:send_all('0')
else

Loading…
Cancel
Save