aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-05-17 18:28:05 +0200
committerKim Alvefur <zash@zash.se>2013-05-17 18:28:05 +0200
commit73fe0d54714b34a0a202f1d1e9f2390ad9a54ad6 (patch)
treef236c1234a3f12b0620e6c4b311b44a4f0527e9e
parent87c32db77c63f9ada68a7d612a1379286cf0f8c8 (diff)
downloadprosody-73fe0d54714b34a0a202f1d1e9f2390ad9a54ad6.tar.gz
prosody-73fe0d54714b34a0a202f1d1e9f2390ad9a54ad6.zip
mod_admin_telnet: Use stanza:get_child_text()
-rw-r--r--plugins/mod_admin_telnet.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 08fe57c0..2056f1e2 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -538,12 +538,7 @@ function def_env.c2s:show(match_jid)
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