aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-06-09 12:59:23 +0200
committerKim Alvefur <zash@zash.se>2013-06-09 12:59:23 +0200
commita07cafce699eefa1c588171d29ce9ad8944d30a1 (patch)
tree1d210b590fff26bb1a31cf37fbdeb2786037e66b /plugins/mod_admin_telnet.lua
parenta6d4b7ca4d2b039273c693d8c08844ef02b744c5 (diff)
downloadprosody-a07cafce699eefa1c588171d29ce9ad8944d30a1.tar.gz
prosody-a07cafce699eefa1c588171d29ce9ad8944d30a1.zip
mod_admin_telnet: Simplify IPv6 detection, fixes rare traceback
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index ae8ca530..0fcb96b3 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -497,7 +497,7 @@ local function session_flags(session, line)
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, " ");