Mercurial > prosody-modules
comparison mod_protect_last_admin/mod_protect_last_admin.lua @ 6437:d1f64ffca879
mod_protect_last_admin: Replace util.serialization.serialize with %q
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Wed, 11 Mar 2026 00:32:23 +0100 |
| parents | 187b957dc528 |
| children |
comparison
equal
deleted
inserted
replaced
| 6436:fdf7b82099de | 6437:d1f64ffca879 |
|---|---|
| 21 | 21 |
| 22 local function other_protected_users(username, host) | 22 local function other_protected_users(username, host) |
| 23 local protected_users = set.new(); | 23 local protected_users = set.new(); |
| 24 for protected_role in protected_roles do | 24 for protected_role in protected_roles do |
| 25 local users = um.get_users_with_role(protected_role, host); | 25 local users = um.get_users_with_role(protected_role, host); |
| 26 module:log("debug", "Role %s: %s", protected_role, require "util.serialization".serialize(users, "debug")); | 26 module:log("debug", "Role %s: %q", protected_role, users); |
| 27 protected_users:add_list(um.get_users_with_role(protected_role, host)); | 27 protected_users:add_list(um.get_users_with_role(protected_role, host)); |
| 28 end | 28 end |
| 29 protected_users:remove(username); | 29 protected_users:remove(username); |
| 30 return not protected_users:empty(); | 30 return not protected_users:empty(); |
| 31 end | 31 end |
