projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_iq: Optimized a bit more (fewer table accesses).
[prosody.git]
/
prosodyctl
diff --git
a/prosodyctl
b/prosodyctl
index bbd051a860de4eaa838d034843d44cdccb1aaf8e..cfc5ca77a979d74268a5483455984ec2da170462 100755
(executable)
--- a/
prosodyctl
+++ b/
prosodyctl
@@
-1,7
+1,7
@@
#!/usr/bin/env lua
-- Prosody IM
#!/usr/bin/env lua
-- Prosody IM
--- Copyright (C) 2008-20
09
Matthew Wild
--- Copyright (C) 2008-20
09
Waqas Hussain
+-- Copyright (C) 2008-20
10
Matthew Wild
+-- Copyright (C) 2008-20
10
Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
@@
-11,18
+11,20
@@
-- Will be modified by configure script if run --
-- Will be modified by configure script if run --
-CFG_SOURCEDIR=
nil
;
+CFG_SOURCEDIR=
os.getenv("PROSODY_SRCDIR")
;
CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR");
CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR");
-CFG_PLUGINDIR=
nil
;
+CFG_PLUGINDIR=
os.getenv("PROSODY_PLUGINDIR")
;
CFG_DATADIR=os.getenv("PROSODY_DATADIR");
CFG_DATADIR=os.getenv("PROSODY_DATADIR");
--- -- -- -- -- -- -- ---- -- -- -- -- -- -- -- --
+-- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- --
+-- Tell Lua where to find our libraries
if CFG_SOURCEDIR then
if CFG_SOURCEDIR then
- package.path = CFG_SOURCEDIR.."/?.lua;"..package.path
- package.cpath = CFG_SOURCEDIR.."/?.so;"..package.cpath
+ package.path = CFG_SOURCEDIR.."/?.lua;"..package.path
;
+ package.cpath = CFG_SOURCEDIR.."/?.so;"..package.cpath
;
end
end
+-- Substitute ~ with path to home directory in data path
if CFG_DATADIR then
if os.getenv("HOME") then
CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME"));
if CFG_DATADIR then
if os.getenv("HOME") then
CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME"));
@@
-31,9
+33,11
@@
end
-- Global 'prosody' object
prosody = {
-- Global 'prosody' object
prosody = {
- hosts = {},
- events = require "util.events".new(),
- platform = "posix"
+ hosts = {};
+ events = require "util.events".new();
+ platform = "posix";
+ lock_globals = function () end;
+ unlock_globals = function () end;
};
local prosody = prosody;
};
local prosody = prosody;
@@
-327,7
+331,7
@@
function commands.adduser(arg)
if ok then return 0; end
if ok then return 0; end
- show_message(
error_messages[msg]
)
+ show_message(
msg
)
return 1;
end
return 1;
end