Diff

plugins/mod_admin_telnet.lua @ 5662:685d46ec352b

mod_admin_telnet: Simplify IPv6 detection, fixes rare traceback
author Kim Alvefur <zash@zash.se>
date Sun, 09 Jun 2013 12:59:23 +0200
parent 5645:ae079d57af2e
child 5666:c1e1b265ee82
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sun Jun 09 12:54:10 2013 +0200
+++ b/plugins/mod_admin_telnet.lua	Sun Jun 09 12:59:23 2013 +0200
@@ -497,7 +497,7 @@
 	if session.smacks then
 		line[#line+1] = "(sm)";
 	end
-	if (session.ip or session.conn and session.conn:ip()):match(":") then
+	if session.ip and session.ip:match(":") then
 		line[#line+1] = "(IPv6)";
 	end
 	return table.concat(line, " ");