aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-02-17 19:07:57 +0100
committerKim Alvefur <zash@zash.se>2024-02-17 19:07:57 +0100
commit2ef771fff8ff2a2f764c3d0ea8397902f187d72e (patch)
tree64dc2e24a552d15610ebe2c24d24440dd82602f1 /plugins/mod_c2s.lua
parent7be4e2fd31321ae7c6a9a07217345c9bdbd2878a (diff)
downloadprosody-2ef771fff8ff2a2f764c3d0ea8397902f187d72e.tar.gz
prosody-2ef771fff8ff2a2f764c3d0ea8397902f187d72e.zip
mod_c2s: Fix error on role change on Components (thanks Menel)
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 4dabf34b..1a24c27c 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -252,6 +252,9 @@ end
local function disconnect_user_sessions(reason, leave_resource)
return function (event)
local username, host, resource = event.username, event.host, event.resource;
+ if not (hosts[host] and hosts[host].type == "local") then
+ return -- not a local VirtualHost so no sessions
+ end
local user = hosts[host].sessions[username];
if user and user.sessions then
for r, session in pairs(user.sessions) do