From 0fb838ecd2febc14ccc75cd3123adc5a78641779 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Jul 2012 21:36:47 +0200 Subject: mod_admin_telnet: Remove unused or duplicated locals --- plugins/mod_admin_telnet.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'plugins/mod_admin_telnet.lua') diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 2ed4ac79..7cfb2751 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -642,7 +642,6 @@ local function print_errors(print, errors) end function def_env.s2s:showcert(domain) - local ser = require "util.serialization".serialize; local print = self.session.print; local domain_sessions = set.new(array.collect(keys(incoming_s2s))) /function(session) return session.from_host == domain and session or nil; end; @@ -689,7 +688,6 @@ function def_env.s2s:showcert(domain) end local domain_certs = array.collect(values(cert_set)); -- Phew. We now have a array of unique certificates presented by domain. - local print = self.session.print; local n_certs = #domain_certs; if n_certs == 0 then -- cgit v1.2.3 From 04ae0b2698f5948738e48bc26b8ea3da739f673a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Jul 2012 21:37:16 +0200 Subject: mod_admin_telnet: Add missing import of usermanager --- plugins/mod_admin_telnet.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/mod_admin_telnet.lua') diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 7cfb2751..17e5babc 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -902,6 +902,8 @@ function def_env.muc:room(room_jid) return setmetatable({ room = room_obj }, console_room_mt); end +local um = require"core.usermanager"; + def_env.user = {}; function def_env.user:create(jid, password) local username, host = jid_split(jid); -- cgit v1.2.3 From 4866b29bb88dfc504c313e2a2a0562d1b71f7771 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Jul 2012 22:03:51 +0200 Subject: mod_admin_telnet: Remove useless call to string.lower() --- plugins/mod_admin_telnet.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/mod_admin_telnet.lua') diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 17e5babc..b698d200 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -93,8 +93,7 @@ function console_listener.onincoming(conn, data) commands["bye"](session, line); break; else - local command = line:lower(); - command = line:match("^%w+") or line:match("%p"); + local command = line:match("^%w+") or line:match("%p"); if commands[command] then commands[command](session, line); break; -- cgit v1.2.3