Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 11950:d2a9e95fd27b
mod_admin_shell: Fix indentation
It was all of for some reason
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 26 Nov 2021 22:28:37 +0100 |
parent | 11949:ae4bc56f18e0 |
child | 11953:848a522fd731 |
comparison
equal
deleted
inserted
replaced
11949:ae4bc56f18e0 | 11950:d2a9e95fd27b |
---|---|
87 return session.send(st.stanza("repl-output"):text(tostring(line))); | 87 return session.send(st.stanza("repl-output"):text(tostring(line))); |
88 end | 88 end |
89 | 89 |
90 function console:new_session(admin_session) | 90 function console:new_session(admin_session) |
91 local session = { | 91 local session = { |
92 send = function (t) | 92 send = function (t) |
93 return send_repl_output(admin_session, t); | 93 return send_repl_output(admin_session, t); |
94 end; | 94 end; |
95 print = function (...) | 95 print = function (...) |
96 local t = {}; | 96 local t = {}; |
97 for i=1,select("#", ...) do | 97 for i=1,select("#", ...) do |
98 t[i] = tostring(select(i, ...)); | 98 t[i] = tostring(select(i, ...)); |
99 end | 99 end |
100 return send_repl_output(admin_session, table.concat(t, "\t")); | 100 return send_repl_output(admin_session, table.concat(t, "\t")); |
101 end; | 101 end; |
102 serialize = tostring; | 102 serialize = tostring; |
103 disconnect = function () admin_session:close(); end; | 103 disconnect = function () admin_session:close(); end; |
104 }; | 104 }; |
105 session.env = setmetatable({}, default_env_mt); | 105 session.env = setmetatable({}, default_env_mt); |
106 | 106 |
107 session.thread = async.runner(function (line) | 107 session.thread = async.runner(function (line) |
108 console:process_line(session, line); | 108 console:process_line(session, line); |
109 end, runner_callbacks, session); | 109 end, runner_callbacks, session); |