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) |