Software /
code /
prosody
Comparison
plugins/mod_c2s.lua @ 8201:a0ad62a269df
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 28 Aug 2017 21:05:12 +0200 |
parent | 8044:e38e3300b955 |
parent | 8192:4354f556c5db |
child | 8235:7d9a2c200736 |
comparison
equal
deleted
inserted
replaced
8185:e89320b8a789 | 8201:a0ad62a269df |
---|---|
199 session:close{ condition = "not-authorized", text = "Account deleted" }; | 199 session:close{ condition = "not-authorized", text = "Account deleted" }; |
200 end | 200 end |
201 end | 201 end |
202 end, 200); | 202 end, 200); |
203 | 203 |
204 module:hook_global("user-password-changed", function(event) | |
205 local username, host, resource = event.username, event.host, event.resource; | |
206 local user = hosts[host].sessions[username]; | |
207 if user and user.sessions then | |
208 for r, session in pairs(user.sessions) do | |
209 if r ~= resource then | |
210 session:close{ condition = "reset", text = "Password changed" }; | |
211 end | |
212 end | |
213 end | |
214 end, 200); | |
215 | |
204 function runner_callbacks:ready() | 216 function runner_callbacks:ready() |
205 self.data.conn:resume(); | 217 self.data.conn:resume(); |
206 end | 218 end |
207 | 219 |
208 function runner_callbacks:waiting() | 220 function runner_callbacks:waiting() |