equal
deleted
inserted
replaced
278 startup.detect_installed(); |
278 startup.detect_installed(); |
279 _G.prosody = prosody; |
279 _G.prosody = prosody; |
280 |
280 |
281 -- COMPAT Lua < 5.3 |
281 -- COMPAT Lua < 5.3 |
282 if not math.type then |
282 if not math.type then |
283 -- luacheck: ignore 122/math |
283 require "util.mathcompat" |
284 function math.type(n) |
|
285 if type(n) == "number" then |
|
286 if n % 1 == 0 and (n + 1 ~= n and n - 1 ~= n) then |
|
287 return "integer" |
|
288 else |
|
289 return "float" |
|
290 end |
|
291 end |
|
292 end |
|
293 end |
284 end |
294 end |
285 end |
295 |
286 |
296 function startup.setup_datadir() |
287 function startup.setup_datadir() |
297 prosody.paths.data = config.get("*", "data_path") or CFG_DATADIR or "data"; |
288 prosody.paths.data = config.get("*", "data_path") or CFG_DATADIR or "data"; |