# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1350059604 -7200
# Node ID ecd9e300ec943bf8de088490065f036180e37e69
# Parent  39bb9344f194f81c3f0ecb266362c702709db404
mod_admin_telnet: user:list() check that the given host exists

diff -r 39bb9344f194 -r ecd9e300ec94 plugins/mod_admin_telnet.lua
--- 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