plugins/mod_console.lua

changeset 1559
831649bb1922
parent 1558
e15917530285
child 1582
80d3d95aa83c
equal deleted inserted replaced
1558:e15917530285 1559:831649bb1922
182 t = (t - hours)/24; 182 t = (t - hours)/24;
183 local days = t; 183 local days = t;
184 return true, string.format("This server has been running for %d day%s, %d hour%s and %d minute%s (since %s)", 184 return true, string.format("This server has been running for %d day%s, %d hour%s and %d minute%s (since %s)",
185 days, (days ~= 1 and "s") or "", hours, (hours ~= 1 and "s") or "", 185 days, (days ~= 1 and "s") or "", hours, (hours ~= 1 and "s") or "",
186 minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time)); 186 minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time));
187 end
188
189 function def_env.server:shutdown(reason)
190 prosody.shutdown(reason);
191 return true, "Shutdown initiated";
187 end 192 end
188 193
189 def_env.module = {}; 194 def_env.module = {};
190 195
191 local function get_hosts_set(hosts, module) 196 local function get_hosts_set(hosts, module)

mercurial