# HG changeset patch # User Kim Alvefur # Date 1442585770 -7200 # Node ID 229e95aecf41b20cf61ab8c16ea110166f228d9e # Parent 13b44929ae4974f349ffdcff29e303a7656aff60 mod_admin_telnet: Fix indentation diff -r 13b44929ae49 -r 229e95aecf41 plugins/mod_admin_telnet.lua --- 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