equal
deleted
inserted
replaced
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() |