mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2025-02-26 13:31:13 +00:00
Basic Lua 5.0 compatibility for ETPro
This commit is contained in:
parent
5e3c966453
commit
1ab9877e77
97 changed files with 413 additions and 395 deletions
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local admin = {}
|
local admin = {}
|
||||||
|
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local teams = require (wolfa_getLuaPath()..".game.teams")
|
local teams = wolfa_requireModule("game.teams")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local bits = require (wolfa_getLuaPath()..".util.bits")
|
local bits = wolfa_requireModule("util.bits")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
local timers = require (wolfa_getLuaPath()..".util.timers")
|
local timers = wolfa_requireModule("util.timers")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local balancer = {}
|
local balancer = {}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local bans = {}
|
local bans = {}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local history = {}
|
local history = {}
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local timers = require (wolfa_getLuaPath()..".util.timers")
|
local timers = wolfa_requireModule("util.timers")
|
||||||
|
|
||||||
local mutes = {}
|
local mutes = {}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local files = require (wolfa_getLuaPath()..".util.files")
|
local files = wolfa_requireModule("util.files")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local toml = require "toml"
|
local toml = wolfa_requireLib("toml")
|
||||||
|
|
||||||
local rules = {}
|
local rules = {}
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
|
|
||||||
local acl = {}
|
local acl = {}
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local auth = {}
|
local auth = {}
|
||||||
|
|
||||||
|
@ -129,11 +129,11 @@ function auth.onGameInit()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
srv = require (wolfa_getLuaPath()..".auth.acl")
|
srv = wolfa_requireModule("auth.acl")
|
||||||
|
|
||||||
srv.readPermissions()
|
srv.readPermissions()
|
||||||
else
|
else
|
||||||
srv = require (wolfa_getLuaPath()..".auth.shrubbot")
|
srv = wolfa_requireModule("auth.shrubbot")
|
||||||
|
|
||||||
srv.loadFlags(et.trap_Cvar_Get("fs_game"))
|
srv.loadFlags(et.trap_Cvar_Get("fs_game"))
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
local shrubbot = {}
|
local shrubbot = {}
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local flags
|
local flags
|
||||||
|
|
||||||
function shrubbot.loadFlags(mod)
|
function shrubbot.loadFlags(mod)
|
||||||
flags = require (wolfa_getLuaPath()..".auth.shrubbot."..mod)
|
flags = wolfa_requireModule("auth.shrubbot."..mod)
|
||||||
end
|
end
|
||||||
|
|
||||||
function shrubbot.isPlayerAllowed(clientId, permission)
|
function shrubbot.isPlayerAllowed(clientId, permission)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
-- ETPub shrubbot flags
|
-- ETPub shrubbot flags
|
||||||
-- left by mod: fjlovyDHJOTY
|
-- left by mod: fjlovyDHJOTY
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
-- NoQuarter shrubbot flags
|
-- NoQuarter shrubbot flags
|
||||||
-- left by mod: jlqyFHOQY
|
-- left by mod: jlqyFHOQY
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
-- silEnT shrubbot flags
|
-- silEnT shrubbot flags
|
||||||
-- left by mod: fhjovyDHJOTY
|
-- left by mod: fhjovyDHJOTY
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandAdminTest(clientId, command)
|
function commandAdminTest(clientId, command)
|
||||||
local level = auth.getPlayerLevel(clientId)
|
local level = auth.getPlayerLevel(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local balancer = require (wolfa_getLuaPath()..".admin.balancer")
|
local balancer = wolfa_requireModule("admin.balancer")
|
||||||
|
|
||||||
function commandBalance(clientId, command, action)
|
function commandBalance(clientId, command, action)
|
||||||
if action == "enable" then
|
if action == "enable" then
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local bans = require (wolfa_getLuaPath()..".admin.bans")
|
local bans = wolfa_requireModule("admin.bans")
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandBan(clientId, command, victim, ...)
|
function commandBan(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandCoinToss(clientId, command)
|
function commandCoinToss(clientId, command)
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local voting = require (wolfa_getLuaPath()..".game.voting")
|
local voting = wolfa_requireModule("game.voting")
|
||||||
|
|
||||||
function commandEnableVote(clientId, command)
|
function commandEnableVote(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^denablevote: ^9next map voting has been enabled.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^denablevote: ^9next map voting has been enabled.\";")
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandFinger(clientId, command, victim)
|
function commandFinger(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandGib(clientId, command, victim)
|
function commandGib(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local greetings = require (wolfa_getLuaPath()..".players.greetings")
|
local greetings = wolfa_requireModule("players.greetings")
|
||||||
|
|
||||||
function commandGreeting(clientId, command)
|
function commandGreeting(clientId, command)
|
||||||
local greeting = greetings.get(clientId)
|
local greeting = greetings.get(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandHelp(clientId, command, cmd)
|
function commandHelp(clientId, command, cmd)
|
||||||
local cmds = commands.getadmin()
|
local cmds = commands.getadmin()
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
function commandIncognito(clientId, command)
|
function commandIncognito(clientId, command)
|
||||||
local isIncognito = auth.isPlayerAllowed(clientId, auth.PERM_INCOGNITO, true)
|
local isIncognito = auth.isPlayerAllowed(clientId, auth.PERM_INCOGNITO, true)
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local admin = require (wolfa_getLuaPath()..".admin.admin")
|
local admin = wolfa_requireModule("admin.admin")
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandKick(clientId, command, victim, ...)
|
function commandKick(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
local bots = wolfa_requireModule("game.bots")
|
||||||
|
|
||||||
function commandBotsOff(clientId, command)
|
function commandBotsOff(clientId, command)
|
||||||
bots.enable(false)
|
bots.enable(false)
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local pagination = require (wolfa_getLuaPath()..".util.pagination")
|
local pagination = wolfa_requireModule("util.pagination")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandListAliases(clientId, command, victim, offset)
|
function commandListAliases(clientId, command, victim, offset)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local game = require (wolfa_getLuaPath()..".game.game")
|
local game = wolfa_requireModule("game.game")
|
||||||
|
|
||||||
function commandListMaps(clientId, command)
|
function commandListMaps(clientId, command)
|
||||||
local maps = game.getMaps()
|
local maps = game.getMaps()
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local fireteams = require (wolfa_getLuaPath()..".game.fireteams")
|
local fireteams = wolfa_requireModule("game.fireteams")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandListPlayers(clientId, command)
|
function commandListPlayers(clientId, command)
|
||||||
local playersOnline = {}
|
local playersOnline = {}
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local teams = require (wolfa_getLuaPath()..".game.teams")
|
local teams = wolfa_requireModule("game.teams")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandLock(clientId, command, team)
|
function commandLock(clientId, command, team)
|
||||||
if team == nil or (team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC and team ~= "all") then
|
if team == nil or (team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC and team ~= "all") then
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
local mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
local mutes = wolfa_requireModule("admin.mutes")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandMute(clientId, command, victim, ...)
|
function commandMute(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
local bots = wolfa_requireModule("game.bots")
|
||||||
|
|
||||||
function commandBotsOn(clientId, command)
|
function commandBotsOn(clientId, command)
|
||||||
bots.enable(true)
|
bots.enable(true)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandNextMap(clientId, command)
|
function commandNextMap(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dnextmap: ^9next map was loaded.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dnextmap: ^9next map was loaded.\";")
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandPause(clientId, command)
|
function commandPause(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map paused.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map paused.\";")
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandPlayerLock(clientId, command, victim)
|
function commandPlayerLock(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandPlayerUnlock(clientId, command, victim)
|
function commandPlayerUnlock(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local admin = require (wolfa_getLuaPath()..".admin.admin")
|
local admin = wolfa_requireModule("admin.admin")
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandPlayerLock(clientId, command, victim, team)
|
function commandPlayerLock(clientId, command, victim, team)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local balancer = require (wolfa_getLuaPath()..".admin.balancer")
|
local balancer = wolfa_requireModule("admin.balancer")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
local bots = wolfa_requireModule("game.bots")
|
||||||
|
|
||||||
function commandPutBots(clientId, command, team)
|
function commandPutBots(clientId, command, team)
|
||||||
if team == nil and team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC then
|
if team == nil and team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC then
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local rules = require (wolfa_getLuaPath()..".admin.rules")
|
local rules = wolfa_requireModule("admin.rules")
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local sprees = require (wolfa_getLuaPath()..".game.sprees")
|
local sprees = wolfa_requireModule("game.sprees")
|
||||||
|
|
||||||
local greetings = require (wolfa_getLuaPath()..".players.greetings")
|
local greetings = wolfa_requireModule("players.greetings")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandReadconfig(clientId, command)
|
function commandReadconfig(clientId, command)
|
||||||
settings.load()
|
settings.load()
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandReset(clientId, command)
|
function commandReset(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dreset: ^9match reset.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dreset: ^9match reset.\";")
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local game = require (wolfa_getLuaPath()..".game.game")
|
local game = wolfa_requireModule("game.game")
|
||||||
local sprees = require (wolfa_getLuaPath()..".game.sprees")
|
local sprees = wolfa_requireModule("game.sprees")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandResetSprees(clientId, command, map)
|
function commandResetSprees(clientId, command, map)
|
||||||
if not db.isConnected() then
|
if not db.isConnected() then
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local game = require (wolfa_getLuaPath()..".game.game")
|
local game = wolfa_requireModule("game.game")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandRestart(clientId, command)
|
function commandRestart(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drestart: ^9map restarted.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drestart: ^9map restarted.\";")
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local rules = require (wolfa_getLuaPath()..".admin.rules")
|
local rules = wolfa_requireModule("admin.rules")
|
||||||
|
|
||||||
function commandRules(clientId, command, rule)
|
function commandRules(clientId, command, rule)
|
||||||
if not rule then
|
if not rule then
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local admin = require (wolfa_getLuaPath()..".admin.admin")
|
local admin = wolfa_requireModule("admin.admin")
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandSetLevel(clientId, command, victim, level)
|
function commandSetLevel(clientId, command, victim, level)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local bans = require (wolfa_getLuaPath()..".admin.bans")
|
local bans = wolfa_requireModule("admin.bans")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local pagination = require (wolfa_getLuaPath()..".util.pagination")
|
local pagination = wolfa_requireModule("util.pagination")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandShowBans(clientId, offset)
|
function commandShowBans(clientId, offset)
|
||||||
if not db.isConnected() then
|
if not db.isConnected() then
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local pagination = require (wolfa_getLuaPath()..".util.pagination")
|
local pagination = wolfa_requireModule("util.pagination")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandListHistory(clientId, command, victim, offset)
|
function commandListHistory(clientId, command, victim, offset)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandShuffle(clientId, command)
|
function commandShuffle(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by XP.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by XP.\";")
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandShuffleSR(clientId, command)
|
function commandShuffleSR(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by Skill Rating.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled by Skill Rating.\";")
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandSlap(clientId, command, victim)
|
function commandSlap(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local admin = require (wolfa_getLuaPath()..".admin.admin")
|
local admin = wolfa_requireModule("admin.admin")
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandSpec999(clientId, command)
|
function commandSpec999(clientId, command)
|
||||||
local count = 0
|
local count = 0
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local sprees = require (wolfa_getLuaPath()..".game.sprees")
|
local sprees = wolfa_requireModule("game.sprees")
|
||||||
|
|
||||||
function commandShowSprees(clientId, command)
|
function commandShowSprees(clientId, command)
|
||||||
if not db.isConnected() then
|
if not db.isConnected() then
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandShowStats(clientId, command, victim)
|
function commandShowStats(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandSwap(clientId, command)
|
function commandSwap(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dswap: ^9teams swapped.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dswap: ^9teams swapped.\";")
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandTime(clientId, command)
|
function commandTime(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dtime: ^9current time is ^7"..os.date("%H:%M:%S").."^9.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dtime: ^9current time is ^7"..os.date("%H:%M:%S").."^9.\";")
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local bans = require (wolfa_getLuaPath()..".admin.bans")
|
local bans = wolfa_requireModule("admin.bans")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandRemoveBan(clientId, command, banId)
|
function commandRemoveBan(clientId, command, banId)
|
||||||
if settings.get("g_standalone") == 0 or not db.isConnected() then
|
if settings.get("g_standalone") == 0 or not db.isConnected() then
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local teams = require (wolfa_getLuaPath()..".game.teams")
|
local teams = wolfa_requireModule("game.teams")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandUnlock(clientId, command, team)
|
function commandUnlock(clientId, command, team)
|
||||||
if team == nil or (team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC and team ~= "all") then
|
if team == nil or (team ~= constants.TEAM_AXIS_SC and team ~= constants.TEAM_ALLIES_SC and team ~= constants.TEAM_SPECTATORS_SC and team ~= "all") then
|
||||||
|
|
|
@ -15,15 +15,15 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
local mutes = wolfa_requireModule("admin.mutes")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandUnmute(clientId, command, victim)
|
function commandUnmute(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandUnpause(clientId, command)
|
function commandUnpause(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map unpaused.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map unpaused.\";")
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
local mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
local mutes = wolfa_requireModule("admin.mutes")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandVoiceMute(clientId, command, victim, ...)
|
function commandVoiceMute(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandVoiceUnmute(clientId, command, victim)
|
function commandVoiceUnmute(clientId, command, victim)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
local history = wolfa_requireModule("admin.history")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandWarn(clientId, command, victim, ...)
|
function commandWarn(clientId, command, victim, ...)
|
||||||
local cmdClient
|
local cmdClient
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandAdminChat(clientId, command, ...)
|
function commandAdminChat(clientId, command, ...)
|
||||||
if not ... then
|
if not ... then
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
|
|
||||||
function commandCallVote(clientId, command)
|
function commandCallVote(clientId, command)
|
||||||
local voteArguments = {}
|
local voteArguments = {}
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local logs = require (wolfa_getLuaPath()..".util.logs")
|
local logs = wolfa_requireModule("util.logs")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandPersonalMessage(clientId, command, recipient, ...)
|
function commandPersonalMessage(clientId, command, recipient, ...)
|
||||||
if recipient and ... then
|
if recipient and ... then
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local logs = require (wolfa_getLuaPath()..".util.logs")
|
local logs = wolfa_requireModule("util.logs")
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
function commandR(clientId, command, ...)
|
function commandR(clientId, command, ...)
|
||||||
if not ... then
|
if not ... then
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local logs = require (wolfa_getLuaPath()..".util.logs")
|
local logs = wolfa_requireModule("util.logs")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local types = {
|
local types = {
|
||||||
["say"] = "chat",
|
["say"] = "chat",
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local teams = require (wolfa_getLuaPath()..".game.teams")
|
local teams = wolfa_requireModule("game.teams")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandTeam(clientId, command)
|
function commandTeam(clientId, command)
|
||||||
if players.isTeamLocked(clientId) then
|
if players.isTeamLocked(clientId) then
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
function commandWolfAdmin(clientId, command)
|
function commandWolfAdmin(clientId, command)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^3This server is running ^7Wolf^1Admin ^7"..wolfa_getVersion().." ^3("..wolfa_getRelease().."^3)\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^3This server is running ^7Wolf^1Admin ^7"..wolfa_getVersion().." ^3("..wolfa_getRelease().."^3)\";")
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local files = require (wolfa_getLuaPath()..".util.files")
|
local files = wolfa_requireModule("util.files")
|
||||||
local logs = require (wolfa_getLuaPath()..".util.logs")
|
local logs = wolfa_requireModule("util.logs")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
|
|
||||||
local commands = {}
|
local commands = {}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ function commands.loadFiles(dir)
|
||||||
|
|
||||||
for _, file in pairs(files) do
|
for _, file in pairs(files) do
|
||||||
if string.match(string.lower(file), "^[a-z0-9]+%.lua$") then
|
if string.match(string.lower(file), "^[a-z0-9]+%.lua$") then
|
||||||
require (wolfa_getLuaPath()..".commands."..dir.."."..string.sub(file, 1, string.len(file) - 4))
|
wolfa_requireModule("commands."..dir.."."..string.sub(file, 1, string.len(file) - 4))
|
||||||
|
|
||||||
amount = amount + 1
|
amount = amount + 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local acl = require (wolfa_getLuaPath()..".auth.acl")
|
local acl = wolfa_requireModule("auth.acl")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
function commandAclListLevels()
|
function commandAclListLevels()
|
||||||
for _, level in ipairs(acl.getLevels()) do
|
for _, level in ipairs(acl.getLevels()) do
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientAnnounce(command, clientId, text)
|
function commandClientAnnounce(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientChatPrint(command, clientId, text)
|
function commandClientChatPrint(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientCenterPrint(command, clientId, text)
|
function commandClientCenterPrint(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientCPM(command, clientId, text)
|
function commandClientCPM(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientPlayMusic(command, clientId, text)
|
function commandClientPlayMusic(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
local commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
function commandClientConsolePrint(command, clientId, text)
|
function commandClientConsolePrint(command, clientId, text)
|
||||||
local clientId = tonumber(clientId)
|
local clientId = tonumber(clientId)
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local db = {}
|
local db = {}
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ end
|
||||||
function db.oninit()
|
function db.oninit()
|
||||||
if settings.get("db_type") ~= "none" then
|
if settings.get("db_type") ~= "none" then
|
||||||
if settings.get("db_type") == "sqlite3" then
|
if settings.get("db_type") == "sqlite3" then
|
||||||
con = require (wolfa_getLuaPath()..".db.sqlite3")
|
con = wolfa_requireModule("db.sqlite3")
|
||||||
elseif settings.get("db_type") == "mysql" then
|
elseif settings.get("db_type") == "mysql" then
|
||||||
con = require (wolfa_getLuaPath()..".db.mysql")
|
con = wolfa_requireModule("db.mysql")
|
||||||
else
|
else
|
||||||
outputDebug("Invalid database system (none|sqlite3|mysql), defaulting to 'none'.")
|
outputDebug("Invalid database system (none|sqlite3|mysql), defaulting to 'none'.")
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
|
|
||||||
local luasql = require "luasql.mysql"
|
local luasql = require "luasql.mysql"
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
|
|
||||||
local luasql = require "luasql.sqlite3"
|
local luasql = require "luasql.sqlite3"
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local bots = {}
|
local bots = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local bits = require (wolfa_getLuaPath()..".util.bits")
|
local bits = wolfa_requireModule("util.bits")
|
||||||
|
|
||||||
local fireteams = {}
|
local fireteams = {}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local game = {}
|
local game = {}
|
||||||
|
|
||||||
|
|
|
@ -15,19 +15,19 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local game = require (wolfa_getLuaPath()..".game.game")
|
local game = wolfa_requireModule("game.game")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local bits = require (wolfa_getLuaPath()..".util.bits")
|
local bits = wolfa_requireModule("util.bits")
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local files = require (wolfa_getLuaPath()..".util.files")
|
local files = wolfa_requireModule("util.files")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local toml = require "toml"
|
local toml = wolfa_requireLib("toml")
|
||||||
|
|
||||||
local sprees = {}
|
local sprees = {}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
|
|
||||||
local teams = {}
|
local teams = {}
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local timers = require (wolfa_getLuaPath()..".util.timers")
|
local timers = wolfa_requireModule("util.timers")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local voting = {}
|
local voting = {}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,8 @@ local release = "4 January 2019"
|
||||||
|
|
||||||
local basepath
|
local basepath
|
||||||
local homepath
|
local homepath
|
||||||
local luapath
|
local lualibspath
|
||||||
|
local luamodspath
|
||||||
|
|
||||||
-- need to do this somewhere else
|
-- need to do this somewhere else
|
||||||
function wolfa_getVersion()
|
function wolfa_getVersion()
|
||||||
|
@ -74,53 +75,70 @@ function wolfa_getHomePath()
|
||||||
return homepath
|
return homepath
|
||||||
end
|
end
|
||||||
|
|
||||||
function wolfa_getLuaPath()
|
function wolfa_getLuaLibsPath()
|
||||||
return luapath
|
return lualibspath
|
||||||
|
end
|
||||||
|
|
||||||
|
function wolfa_getLuaModsPath()
|
||||||
|
return luamodspath
|
||||||
|
end
|
||||||
|
|
||||||
|
function wolfa_requireLib(lib)
|
||||||
|
return require(wolfa_getLuaLibsPath().."/"..string.gsub(lib, "%.", "/"))
|
||||||
|
end
|
||||||
|
|
||||||
|
function wolfa_requireModule(module)
|
||||||
|
return require(wolfa_getLuaModsPath().."/"..string.gsub(module, "%.", "/"))
|
||||||
end
|
end
|
||||||
|
|
||||||
function et_InitGame(levelTime, randomSeed, restartMap)
|
function et_InitGame(levelTime, randomSeed, restartMap)
|
||||||
-- set up paths
|
-- set up paths
|
||||||
basepath = string.gsub(et.trap_Cvar_Get("fs_basepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
basepath = string.gsub(et.trap_Cvar_Get("fs_basepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
||||||
homepath = string.gsub(et.trap_Cvar_Get("fs_homepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
homepath = string.gsub(et.trap_Cvar_Get("fs_homepath"), "\\", "/").."/"..et.trap_Cvar_Get("fs_game").."/"
|
||||||
luapath = string.gsub(debug.getinfo(1).source, "[\\/]", "."):sub(0, -10)
|
lualibspath = "lualibs"
|
||||||
|
luamodspath = "luascripts/wolfadmin"
|
||||||
|
|
||||||
|
if debug then
|
||||||
|
luamodspath = string.sub(debug.getinfo(1).source, 0, -10)
|
||||||
|
end
|
||||||
|
|
||||||
-- load modules
|
-- load modules
|
||||||
require (wolfa_getLuaPath()..".util.debug")
|
wolfa_requireModule("util.debug")
|
||||||
|
|
||||||
admin = require (wolfa_getLuaPath()..".admin.admin")
|
admin = wolfa_requireModule("admin.admin")
|
||||||
balancer = require (wolfa_getLuaPath()..".admin.balancer")
|
balancer = wolfa_requireModule("admin.balancer")
|
||||||
bans = require (wolfa_getLuaPath()..".admin.bans")
|
bans = wolfa_requireModule("admin.bans")
|
||||||
history = require (wolfa_getLuaPath()..".admin.history")
|
history = wolfa_requireModule("admin.history")
|
||||||
mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
mutes = wolfa_requireModule("admin.mutes")
|
||||||
rules = require (wolfa_getLuaPath()..".admin.rules")
|
rules = wolfa_requireModule("admin.rules")
|
||||||
|
|
||||||
auth = require (wolfa_getLuaPath()..".auth.auth")
|
auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
db = require (wolfa_getLuaPath()..".db.db")
|
db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
commands = require (wolfa_getLuaPath()..".commands.commands")
|
commands = wolfa_requireModule("commands.commands")
|
||||||
|
|
||||||
bots = require (wolfa_getLuaPath()..".game.bots")
|
bots = wolfa_requireModule("game.bots")
|
||||||
game = require (wolfa_getLuaPath()..".game.game")
|
game = wolfa_requireModule("game.game")
|
||||||
fireteams = require (wolfa_getLuaPath()..".game.fireteams")
|
fireteams = wolfa_requireModule("game.fireteams")
|
||||||
sprees = require (wolfa_getLuaPath()..".game.sprees")
|
sprees = wolfa_requireModule("game.sprees")
|
||||||
teams = require (wolfa_getLuaPath()..".game.teams")
|
teams = wolfa_requireModule("game.teams")
|
||||||
voting = require (wolfa_getLuaPath()..".game.voting")
|
voting = wolfa_requireModule("game.voting")
|
||||||
|
|
||||||
greetings = require (wolfa_getLuaPath()..".players.greetings")
|
greetings = wolfa_requireModule("players.greetings")
|
||||||
players = require (wolfa_getLuaPath()..".players.players")
|
players = wolfa_requireModule("players.players")
|
||||||
stats = require (wolfa_getLuaPath()..".players.stats")
|
stats = wolfa_requireModule("players.stats")
|
||||||
|
|
||||||
bits = require (wolfa_getLuaPath()..".util.bits")
|
bits = wolfa_requireModule("util.bits")
|
||||||
constants = require (wolfa_getLuaPath()..".util.constants")
|
constants = wolfa_requireModule("util.constants")
|
||||||
events = require (wolfa_getLuaPath()..".util.events")
|
events = wolfa_requireModule("util.events")
|
||||||
files = require (wolfa_getLuaPath()..".util.files")
|
files = wolfa_requireModule("util.files")
|
||||||
logs = require (wolfa_getLuaPath()..".util.logs")
|
logs = wolfa_requireModule("util.logs")
|
||||||
pagination = require (wolfa_getLuaPath()..".util.pagination")
|
pagination = wolfa_requireModule("util.pagination")
|
||||||
settings = require (wolfa_getLuaPath()..".util.settings")
|
settings = wolfa_requireModule("util.settings")
|
||||||
tables = require (wolfa_getLuaPath()..".util.tables")
|
tables = wolfa_requireModule("util.tables")
|
||||||
timers = require (wolfa_getLuaPath()..".util.timers")
|
timers = wolfa_requireModule("util.timers")
|
||||||
util = require (wolfa_getLuaPath()..".util.util")
|
util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
-- register the module
|
-- register the module
|
||||||
et.RegisterModname("WolfAdmin "..wolfa_getVersion())
|
et.RegisterModname("WolfAdmin "..wolfa_getVersion())
|
||||||
|
|
|
@ -15,19 +15,19 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
local auth = wolfa_requireModule("auth.auth")
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
local files = require (wolfa_getLuaPath()..".util.files")
|
local files = wolfa_requireModule("util.files")
|
||||||
|
|
||||||
local toml = require "toml"
|
local toml = wolfa_requireLib("toml")
|
||||||
|
|
||||||
local greetings = {}
|
local greetings = {}
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local db = require (wolfa_getLuaPath()..".db.db")
|
local db = wolfa_requireModule("db.db")
|
||||||
|
|
||||||
local bits = require (wolfa_getLuaPath()..".util.bits")
|
local bits = wolfa_requireModule("util.bits")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
|
|
||||||
local players = {}
|
local players = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local stats = {}
|
local stats = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local bits = {}
|
local bits = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local COLOURS_CHAT = {
|
local COLOURS_CHAT = {
|
||||||
[1] = "^_", -- termination
|
[1] = "^_", -- termination
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local events = {}
|
local events = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local files = {}
|
local files = {}
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ function files.ls(directory)
|
||||||
local entries = {}
|
local entries = {}
|
||||||
|
|
||||||
if platform == "unix" then
|
if platform == "unix" then
|
||||||
command = 'ls -1 "'..wolfa_getBasePath()..wolfa_getLuaPath():gsub("%.", "/").."/"..directory..'"'
|
command = 'ls -1 "'..wolfa_getBasePath()..wolfa_getLuaModsPath():gsub("%.", "/").."/"..directory..'"'
|
||||||
elseif platform == "windows" then
|
elseif platform == "windows" then
|
||||||
command = 'dir "'..wolfa_getBasePath()..wolfa_getLuaPath():gsub("%.", "/").."/"..directory..'" /b'
|
command = 'dir "'..wolfa_getBasePath()..wolfa_getLuaModsPath():gsub("%.", "/").."/"..directory..'" /b'
|
||||||
end
|
end
|
||||||
|
|
||||||
for filename in io.popen(command):lines() do
|
for filename in io.popen(command):lines() do
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local players = require (wolfa_getLuaPath()..".players.players")
|
local players = wolfa_requireModule("players.players")
|
||||||
|
|
||||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
local settings = wolfa_requireModule("util.settings")
|
||||||
|
|
||||||
local logs = {}
|
local logs = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local pagination = {}
|
local pagination = {}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local toml = require "toml"
|
local toml = wolfa_requireLib("toml")
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
|
|
||||||
local settings = {}
|
local settings = {}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ function settings.load()
|
||||||
-- compatibility for 1.1.* and lower
|
-- compatibility for 1.1.* and lower
|
||||||
outputDebug("Using .cfg files is deprecated as of 1.2.0. Please consider updating to .toml files.", 3)
|
outputDebug("Using .cfg files is deprecated as of 1.2.0. Please consider updating to .toml files.", 3)
|
||||||
|
|
||||||
local files = require (wolfa_getLuaPath()..".util.files")
|
local files = wolfa_requireModule("util.files")
|
||||||
local _, array = files.loadFromCFG("wolfadmin.cfg", "[a-z]+")
|
local _, array = files.loadFromCFG("wolfadmin.cfg", "[a-z]+")
|
||||||
|
|
||||||
for blocksname, settings in pairs(array) do
|
for blocksname, settings in pairs(array) do
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local util = require (wolfa_getLuaPath()..".util.util")
|
local util = wolfa_requireModule("util.util")
|
||||||
|
|
||||||
local tables = {}
|
local tables = {}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local events = require (wolfa_getLuaPath()..".util.events")
|
local events = wolfa_requireModule("util.events")
|
||||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
local tables = wolfa_requireModule("util.tables")
|
||||||
|
|
||||||
local timers = {}
|
local timers = {}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
local constants = wolfa_requireModule("util.constants")
|
||||||
|
|
||||||
local util = {}
|
local util = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue