Software /
code /
prosody
Changeset
6838:229e95aecf41
mod_admin_telnet: Fix indentation
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 18 Sep 2015 16:16:10 +0200 |
parents | 6837:13b44929ae49 |
children | 6839:298182fd2387 6840:eeefe8d42b8b |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sat Sep 19 17:46:46 2015 +0200 +++ b/plugins/mod_admin_telnet.lua Fri Sep 18 16:16:10 2015 +0200 @@ -830,19 +830,19 @@ (session.close or s2smanager.destroy_session)(session); count = count + 1 ; end - end + end return true, "Closed "..count.." s2s session"..((count == 1 and "") or "s"); end function def_env.s2s:closeall(host) - local count = 0; + local count = 0; local s2s_sessions = module:shared"/*/s2s/sessions"; for _,session in pairs(s2s_sessions) do if not host or session.from_host == host or session.to_host == host then session:close(); - count = count + 1; - end - end + count = count + 1; + end + end if count == 0 then return false, "No sessions to close."; else return true, "Closed "..count.." s2s session"..((count == 1 and "") or "s"); end end