Diff

plugins/mod_admin_telnet.lua @ 5167:ecd9e300ec94

mod_admin_telnet: user:list() check that the given host exists
author Kim Alvefur <zash@zash.se>
date Fri, 12 Oct 2012 18:33:24 +0200
parent 5159:0638ff1e1a5a
child 5168:46fc0eff10b4
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Mon Oct 01 21:07:20 2012 +0200
+++ b/plugins/mod_admin_telnet.lua	Fri Oct 12 18:33:24 2012 +0200
@@ -956,6 +956,8 @@
 function def_env.user:list(host)
 	if not host then
 		return nil, "No host given";
+	elseif not hosts[host] then
+		return nil, "No such host";
 	end
 	local print = self.session.print;
 	for user in um.users(host) do