# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1335626537 -3600
# Node ID 51ed468662a108e35cc4dc0b0a755d9f19ae5fd9
# Parent  4b8f2b91826c29455370138b2761bb7799f9bf19# Parent  9f2639b3d9b114efa0688d5e580706fbd6ba6707
Merge with Zash

diff -r 4b8f2b91826c -r 51ed468662a1 plugins/mod_admin_telnet.lua
--- a/plugins/mod_admin_telnet.lua	Sat Apr 28 16:21:57 2012 +0100
+++ b/plugins/mod_admin_telnet.lua	Sat Apr 28 16:22:17 2012 +0100
@@ -440,6 +440,16 @@
 	end
 end
 
+function def_env.c2s:count(match_jid)
+	local count = 0;
+	show_c2s(function (jid, session)
+		if (not match_jid) or jid:match(match_jid) then
+			count = count + 1;
+		end		
+	end);
+	return true, "Total: "..count.." clients";
+end
+
 function def_env.c2s:show(match_jid)
 	local print, count = self.session.print, 0;
 	local curr_host;