# HG changeset patch # User Kim Alvefur # Date 1368808085 -7200 # Node ID 98a485212592c9ca2aba82ddaec5e6bf0864bb51 # Parent 5705e21ba24bc3debd8ae5e235a0282e446fb464 mod_admin_telnet: Use stanza:get_child_text() diff -r 5705e21ba24b -r 98a485212592 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Fri May 17 14:56:36 2013 +0100 +++ b/plugins/mod_admin_telnet.lua Fri May 17 18:28:05 2013 +0200 @@ -538,12 +538,7 @@ count = count + 1; local status, priority = "unavailable", tostring(session.priority or "-"); if session.presence then - status = session.presence:child_with_name("show"); - if status then - status = status:get_text() or "[invalid!]"; - else - status = "available"; - end + status = session.presence:get_child_text("show") or "available"; end print(session_flags(session, { " "..jid.." - "..status.."("..priority..")" })); end