Dynamic loading of modules (fixes #71)

This commit is contained in:
Timo Smit 2017-01-18 15:35:24 +01:00
parent 7a93c4bfc9
commit cd4bf52aea
84 changed files with 423 additions and 388 deletions

View file

@ -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 db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
-- local stats = require "luamods.wolfadmin.players.stats" -- local stats = require (wolfa_getLuaPath()..".players.stats")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local admin = {} local admin = {}

View file

@ -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 constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local bits = require "luamods.wolfadmin.util.bits" local bits = require (wolfa_getLuaPath()..".util.bits")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local timers = require "luamods.wolfadmin.util.timers" local timers = require (wolfa_getLuaPath()..".util.timers")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local teams = require "luamods.wolfadmin.game.teams" local teams = require (wolfa_getLuaPath()..".game.teams")
local balancer = {} local balancer = {}

View file

@ -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 "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local bans = {} local bans = {}

View file

@ -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 "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local history = {} local history = {}

View file

@ -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 "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local timers = require "luamods.wolfadmin.util.timers" local timers = require (wolfa_getLuaPath()..".util.timers")
local mutes = {} local mutes = {}

View file

@ -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 events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local rules = {} local rules = {}

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local acl = {} local acl = {}

View file

@ -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 events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local auth = {} local auth = {}
@ -114,9 +114,9 @@ auth.PERM_IMMUNE = "immune"
-- this, but it will suffice. -- this, but it will suffice.
function auth.oninit() function auth.oninit()
if settings.get("g_standalone") == 1 then if settings.get("g_standalone") == 1 then
srv = require "luamods.wolfadmin.auth.acl" srv = require (wolfa_getLuaPath()..".auth.acl")
else else
srv = require "luamods.wolfadmin.auth.shrubbot" srv = require (wolfa_getLuaPath()..".auth.shrubbot")
end end
if settings.get("g_standalone") == 1 and et.trap_Cvar_Get("g_shrubbot") ~= "" then if settings.get("g_standalone") == 1 and et.trap_Cvar_Get("g_shrubbot") ~= "" then

View file

@ -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 events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local shrubbot = {} local shrubbot = {}

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandAdminTest(clientId, cmdArguments) function commandAdminTest(clientId, cmdArguments)
local level = auth.getlevel(clientId) local level = auth.getlevel(clientId)

View file

@ -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 "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local balancer = require "luamods.wolfadmin.admin.balancer" local balancer = require (wolfa_getLuaPath()..".admin.balancer")
function commandBalance(clientId, cmdArguments) function commandBalance(clientId, cmdArguments)
if cmdArguments[1] == "enable" then if cmdArguments[1] == "enable" then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local bans = require "luamods.wolfadmin.admin.bans" local bans = require (wolfa_getLuaPath()..".admin.bans")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandBan(clientId, cmdArguments) function commandBan(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local voting = require "luamods.wolfadmin.game.voting" local voting = require (wolfa_getLuaPath()..".game.voting")
function commandEnableVote(clientId, cmdArguments) function commandEnableVote(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "chat \"^denablevote: ^9next map voting has been enabled.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "chat \"^denablevote: ^9next map voting has been enabled.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandFinger(clientId, cmdArguments) function commandFinger(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandGib(clientId, cmdArguments) function commandGib(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local greetings = require "luamods.wolfadmin.players.greetings" local greetings = require (wolfa_getLuaPath()..".players.greetings")
function commandGreeting(clientId, cmdArguments) function commandGreeting(clientId, cmdArguments)
local greeting = greetings.get(clientId) local greeting = greetings.get(clientId)

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandHelp(clientId, cmdArguments) function commandHelp(clientId, cmdArguments)
local cmds = commands.getadmin() local cmds = commands.getadmin()

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
function commandIncognito(clientId, cmdArguments) function commandIncognito(clientId, cmdArguments)
local fileName = et.trap_Cvar_Get("g_shrubbot") local fileName = et.trap_Cvar_Get("g_shrubbot")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandKick(clientId, cmdArguments) function commandKick(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local bots = require "luamods.wolfadmin.game.bots" local bots = require (wolfa_getLuaPath()..".game.bots")
function commandBotsOff(clientId, cmdArguments) function commandBotsOff(clientId, cmdArguments)
bots.enable(false) bots.enable(false)

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local pagination = require "luamods.wolfadmin.util.pagination" local pagination = require (wolfa_getLuaPath()..".util.pagination")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandListAliases(clientId, cmdArguments) function commandListAliases(clientId, cmdArguments)
if not db.isconnected() then if not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local pagination = require "luamods.wolfadmin.util.pagination" local pagination = require (wolfa_getLuaPath()..".util.pagination")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandListLevels(clientId, cmdArguments) function commandListLevels(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
function commandListMaps(clientId, cmdArguments) function commandListMaps(clientId, cmdArguments)
local output = "" local output = ""

View file

@ -15,18 +15,18 @@
-- 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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local fireteams = require "luamods.wolfadmin.game.fireteams" local fireteams = require (wolfa_getLuaPath()..".game.fireteams")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandListPlayers(clientId, cmdArguments) function commandListPlayers(clientId, cmdArguments)
local playersOnline = {} local playersOnline = {}

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local teams = require "luamods.wolfadmin.game.teams" local teams = require (wolfa_getLuaPath()..".game.teams")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandLock(clientId, cmdArguments) function commandLock(clientId, cmdArguments)
if cmdArguments[1] == nil or (cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC and cmdArguments[1] ~= "all") then if cmdArguments[1] == nil or (cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC and cmdArguments[1] ~= "all") then

View file

@ -15,18 +15,18 @@
-- 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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local mutes = require "luamods.wolfadmin.admin.mutes" local mutes = require (wolfa_getLuaPath()..".admin.mutes")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandMute(clientId, cmdArguments) function commandMute(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local bots = require "luamods.wolfadmin.game.bots" local bots = require (wolfa_getLuaPath()..".game.bots")
function commandBotsOn(clientId, cmdArguments) function commandBotsOn(clientId, cmdArguments)
bots.enable(true) bots.enable(true)

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandNextMap(clientId, cmdArguments) function commandNextMap(clientId, cmdArguments)
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.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandPause(clientId, cmdArguments) function commandPause(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map paused.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map paused.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandPlayerLock(clientId, cmdArguments) function commandPlayerLock(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandPlayerUnlock(clientId, cmdArguments) function commandPlayerUnlock(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandPlayerLock(clientId, cmdArguments) function commandPlayerLock(clientId, cmdArguments)
if cmdArguments[2] == nil or (cmdArguments[2] ~= constants.TEAM_AXIS_SC and cmdArguments[2] ~= constants.TEAM_ALLIES_SC and cmdArguments[2] ~= constants.TEAM_SPECTATORS_SC) then if cmdArguments[2] == nil or (cmdArguments[2] ~= constants.TEAM_AXIS_SC and cmdArguments[2] ~= constants.TEAM_ALLIES_SC and cmdArguments[2] ~= constants.TEAM_SPECTATORS_SC) then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local balancer = require "luamods.wolfadmin.admin.balancer" local balancer = require (wolfa_getLuaPath()..".admin.balancer")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local bots = require "luamods.wolfadmin.game.bots" local bots = require (wolfa_getLuaPath()..".game.bots")
function commandPutBots(clientId, cmdArguments) function commandPutBots(clientId, cmdArguments)
if cmdArguments[1] == nil and cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC then if cmdArguments[1] == nil and cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local rules = require "luamods.wolfadmin.admin.rules" local rules = require (wolfa_getLuaPath()..".admin.rules")
local greetings = require "luamods.wolfadmin.players.greetings" local greetings = require (wolfa_getLuaPath()..".players.greetings")
function commandReadconfig(clientId, cmdArguments) function commandReadconfig(clientId, cmdArguments)
settings.load() settings.load()

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandReset(clientId, cmdArguments) function commandReset(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dreset: ^9match reset.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dreset: ^9match reset.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local sprees = require "luamods.wolfadmin.game.sprees" local sprees = require (wolfa_getLuaPath()..".game.sprees")
function commandResetSprees(clientId, cmdArguments) function commandResetSprees(clientId, cmdArguments)
if not db.isconnected() then if not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandRestart(clientId, cmdArguments) function commandRestart(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drestart: ^9map restarted.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^drestart: ^9map restarted.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local rules = require "luamods.wolfadmin.admin.rules" local rules = require (wolfa_getLuaPath()..".admin.rules")
function commandRules(clientId, cmdArguments) function commandRules(clientId, cmdArguments)
if #cmdArguments == 0 then if #cmdArguments == 0 then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
function commandSetLevel(clientId, cmdArguments) function commandSetLevel(clientId, cmdArguments)
if #cmdArguments < 2 then if #cmdArguments < 2 then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local bans = require "luamods.wolfadmin.admin.bans" local bans = require (wolfa_getLuaPath()..".admin.bans")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local pagination = require "luamods.wolfadmin.util.pagination" local pagination = require (wolfa_getLuaPath()..".util.pagination")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandShowBans(clientId, cmdArguments) function commandShowBans(clientId, cmdArguments)
if not db.isconnected() then if not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local pagination = require "luamods.wolfadmin.util.pagination" local pagination = require (wolfa_getLuaPath()..".util.pagination")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandListHistory(clientId, cmdArguments) function commandListHistory(clientId, cmdArguments)
if settings.get("g_standalone") == 0 or not db.isconnected() then if settings.get("g_standalone") == 0 or not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandShuffle(clientId, cmdArguments) function commandShuffle(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dshuffle: ^9teams were shuffled.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandSlap(clientId, cmdArguments) function commandSlap(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local sprees = require "luamods.wolfadmin.game.sprees" local sprees = require (wolfa_getLuaPath()..".game.sprees")
function commandShowSprees(clientId, cmdArguments) function commandShowSprees(clientId, cmdArguments)
if not db.isconnected() then if not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
function commandShowStats(clientId, cmdArguments) function commandShowStats(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandSwap(clientId, cmdArguments) function commandSwap(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dswap: ^9teams swapped.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dswap: ^9teams swapped.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandTime(clientId, cmdArguments) function commandTime(clientId, cmdArguments)
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.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local bans = require "luamods.wolfadmin.admin.bans" local bans = require (wolfa_getLuaPath()..".admin.bans")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandRemoveBan(clientId, cmdArguments) function commandRemoveBan(clientId, cmdArguments)
if settings.get("g_standalone") == 0 or not db.isconnected() then if settings.get("g_standalone") == 0 or not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local teams = require "luamods.wolfadmin.game.teams" local teams = require (wolfa_getLuaPath()..".game.teams")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandUnlock(clientId, cmdArguments) function commandUnlock(clientId, cmdArguments)
if cmdArguments[1] == nil or (cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC and cmdArguments[1] ~= "all") then if cmdArguments[1] == nil or (cmdArguments[1] ~= constants.TEAM_AXIS_SC and cmdArguments[1] ~= constants.TEAM_ALLIES_SC and cmdArguments[1] ~= constants.TEAM_SPECTATORS_SC and cmdArguments[1] ~= "all") then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local mutes = require "luamods.wolfadmin.admin.mutes" local mutes = require (wolfa_getLuaPath()..".admin.mutes")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandUnmute(clientId, cmdArguments) function commandUnmute(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandUnpause(clientId, cmdArguments) function commandUnpause(clientId, cmdArguments)
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map unpaused.\";") et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \"^dpause: ^9map unpaused.\";")

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local mutes = require "luamods.wolfadmin.admin.mutes" local mutes = require (wolfa_getLuaPath()..".admin.mutes")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandVoiceMute(clientId, cmdArguments) function commandVoiceMute(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
function commandVoiceUnmute(clientId, cmdArguments) function commandVoiceUnmute(clientId, cmdArguments)
if cmdArguments[1] == nil then if cmdArguments[1] == nil then

View file

@ -15,18 +15,18 @@
-- 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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local history = require "luamods.wolfadmin.admin.history" local history = require (wolfa_getLuaPath()..".admin.history")
local db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
function commandWarn(clientId, cmdArguments) function commandWarn(clientId, cmdArguments)
if settings.get("g_warnHistory") == 0 or not db.isconnected() then if settings.get("g_warnHistory") == 0 or not db.isconnected() then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
function commandAdminChat(clientId, cmdArguments) function commandAdminChat(clientId, cmdArguments)
if #cmdArguments == 0 then if #cmdArguments == 0 then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
function commandPersonalMessage(clientId, cmdArguments) function commandPersonalMessage(clientId, cmdArguments)
if #cmdArguments > 1 then if #cmdArguments > 1 then

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
function commandR(clientId, cmdArguments) function commandR(clientId, cmdArguments)
if #cmdArguments == 0 then if #cmdArguments == 0 then

View file

@ -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 auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
function commandWolfAdmin(clientId, cmdArguments) function commandWolfAdmin(clientId, cmdArguments)
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)\";")

View file

@ -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/>.
require "luamods.wolfadmin.util.debug" require (wolfa_getLuaPath()..".util.debug")
local admin = require "luamods.wolfadmin.admin.admin" local admin = require (wolfa_getLuaPath()..".admin.admin")
local auth = require "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local teams = require "luamods.wolfadmin.game.teams" local teams = require (wolfa_getLuaPath()..".game.teams")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local commands = {} local commands = {}
@ -91,7 +91,7 @@ function commands.loadfiles(dir)
for _, file in pairs(files) do for _, file in pairs(files) do
if string.match(string.lower(file), "^[a-z]+%.lua$") then if string.match(string.lower(file), "^[a-z]+%.lua$") then
require ("luamods.wolfadmin.commands."..dir.."."..string.sub(file, 1, string.len(file) - 4)) require (wolfa_getLuaPath()..".commands."..dir.."."..string.sub(file, 1, string.len(file) - 4))
amount = amount + 1 amount = amount + 1
end end

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientAnnounce(clientId, cmdArguments) function commandClientAnnounce(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientChatPrint(clientId, cmdArguments) function commandClientChatPrint(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientCenterPrint(clientId, cmdArguments) function commandClientCenterPrint(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientCPM(clientId, cmdArguments) function commandClientCPM(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientPlayMusic(clientId, cmdArguments) function commandClientPlayMusic(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 commands = require "luamods.wolfadmin.commands.commands" local commands = require (wolfa_getLuaPath()..".commands.commands")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
function commandClientConsolePrint(clientId, cmdArguments) function commandClientConsolePrint(clientId, cmdArguments)
local clientId = tonumber(cmdArguments[1]) local clientId = tonumber(cmdArguments[1])

View file

@ -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 util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local db = {} local db = {}
@ -28,9 +28,9 @@ local con
-- this, but it will suffice. -- this, but it will suffice.
function db.oninit() function db.oninit()
if settings.get("db_type") == "mysql" then if settings.get("db_type") == "mysql" then
con = require "luamods.wolfadmin.db.mysql" con = require (wolfa_getLuaPath()..".db.mysql")
elseif settings.get("db_type") == "sqlite3" then elseif settings.get("db_type") == "sqlite3" then
con = require "luamods.wolfadmin.db.sqlite3" con = require (wolfa_getLuaPath()..".db.sqlite3")
else else
error("invalid database system (choose mysql, sqlite3)") error("invalid database system (choose mysql, sqlite3)")
end end

View file

@ -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 "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local luasql = require "luasql.mysql" local luasql = require "luasql.mysql"

View file

@ -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 "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local luasql = require "luasql.sqlite3" local luasql = require "luasql.sqlite3"

View file

@ -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 "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local bots = {} local bots = {}

View file

@ -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 teams = require "luamods.wolfadmin.game.teams" local teams = require (wolfa_getLuaPath()..".game.teams")
local bits = require "luamods.wolfadmin.util.bits" local bits = require (wolfa_getLuaPath()..".util.bits")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local fireteams = {} local fireteams = {}

View file

@ -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 "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local game = {} local game = {}

View file

@ -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 db = require "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local game = require "luamods.wolfadmin.game.game" local game = require (wolfa_getLuaPath()..".game.game")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
-- local stats = require "luamods.wolfadmin.players.stats" -- local stats = require (wolfa_getLuaPath()..".players.stats")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local sprees = {} local sprees = {}

View file

@ -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 "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local teams = {} local teams = {}

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local timers = require "luamods.wolfadmin.util.timers" local timers = require (wolfa_getLuaPath()..".util.timers")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local bots = require "luamods.wolfadmin.game.bots" local bots = require (wolfa_getLuaPath()..".game.bots")
local voting = {} local voting = {}

View file

@ -15,40 +15,39 @@
-- 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/>.
require "luamods.wolfadmin.util.debug" local constants
local util
local events
local timers
local settings
local constants = require "luamods.wolfadmin.util.constants" local db
local util = require "luamods.wolfadmin.util.util"
local events = require "luamods.wolfadmin.util.events"
local timers = require "luamods.wolfadmin.util.timers"
local settings = require "luamods.wolfadmin.util.settings"
local db = require "luamods.wolfadmin.db.db" local admin
local balancer
local bans
local history
local mutes
local rules
local admin = require "luamods.wolfadmin.admin.admin" local commands
local balancer = require "luamods.wolfadmin.admin.balancer"
local bans = require "luamods.wolfadmin.admin.bans"
local history = require "luamods.wolfadmin.admin.history"
local mutes = require "luamods.wolfadmin.admin.mutes"
local rules = require "luamods.wolfadmin.admin.rules"
local commands = require "luamods.wolfadmin.commands.commands" local game
local bots
local sprees
local teams
local voting
local game = require "luamods.wolfadmin.game.game" local greetings
local bots = require "luamods.wolfadmin.game.bots" local players
local sprees = require "luamods.wolfadmin.game.sprees" local stats
local teams = require "luamods.wolfadmin.game.teams"
local voting = require "luamods.wolfadmin.game.voting"
local greetings = require "luamods.wolfadmin.players.greetings"
local players = require "luamods.wolfadmin.players.players"
local stats = require "luamods.wolfadmin.players.stats"
local version = "1.2.0-dev" local version = "1.2.0-dev"
local release = "TBD" local release = "TBD"
local basepath = nil local basepath = nil
local homepath = nil local homepath = nil
local luapath = nil
-- game related data -- game related data
local currentLevelTime = nil local currentLevelTime = nil
@ -74,15 +73,51 @@ function wolfa_getHomePath()
return homepath return homepath
end end
function wolfa_getLuaPath()
return luapath
end
function et_InitGame(levelTime, randomSeed, restartMap) function et_InitGame(levelTime, randomSeed, restartMap)
et.RegisterModname("WolfAdmin "..wolfa_getVersion()) -- set up paths
outputDebug("Module "..wolfa_getVersion().." ("..wolfa_getRelease()..") loaded successfully. Created by Timo 'Timothy' Smit.")
et.trap_SendConsoleCommand(et.EXEC_APPEND, "sets mod_wolfadmin "..wolfa_getVersion()..";")
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)
-- load modules
require (wolfa_getLuaPath()..".util.debug")
constants = require (wolfa_getLuaPath()..".util.constants")
util = require (wolfa_getLuaPath()..".util.util")
events = require (wolfa_getLuaPath()..".util.events")
timers = require (wolfa_getLuaPath()..".util.timers")
settings = require (wolfa_getLuaPath()..".util.settings")
db = require (wolfa_getLuaPath()..".db.db")
admin = require (wolfa_getLuaPath()..".admin.admin")
balancer = require (wolfa_getLuaPath()..".admin.balancer")
bans = require (wolfa_getLuaPath()..".admin.bans")
history = require (wolfa_getLuaPath()..".admin.history")
mutes = require (wolfa_getLuaPath()..".admin.mutes")
rules = require (wolfa_getLuaPath()..".admin.rules")
commands = require (wolfa_getLuaPath()..".commands.commands")
game = require (wolfa_getLuaPath()..".game.game")
bots = require (wolfa_getLuaPath()..".game.bots")
sprees = require (wolfa_getLuaPath()..".game.sprees")
teams = require (wolfa_getLuaPath()..".game.teams")
voting = require (wolfa_getLuaPath()..".game.voting")
greetings = require (wolfa_getLuaPath()..".players.greetings")
players = require (wolfa_getLuaPath()..".players.players")
stats = require (wolfa_getLuaPath()..".players.stats")
-- register the module
et.RegisterModname("WolfAdmin "..wolfa_getVersion())
et.trap_SendConsoleCommand(et.EXEC_APPEND, "sets mod_wolfadmin "..wolfa_getVersion()..";")
outputDebug("Module "..wolfa_getVersion().." ("..wolfa_getRelease()..") loaded successfully. Created by Timo 'Timothy' Smit.")
currentLevelTime = levelTime currentLevelTime = levelTime

View file

@ -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 "luamods.wolfadmin.auth.auth" local auth = require (wolfa_getLuaPath()..".auth.auth")
local players = require "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local greetings = {} local greetings = {}

View file

@ -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 "luamods.wolfadmin.db.db" local db = require (wolfa_getLuaPath()..".db.db")
local bits = require "luamods.wolfadmin.util.bits" local bits = require (wolfa_getLuaPath()..".util.bits")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local players = {} local players = {}

View file

@ -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 "luamods.wolfadmin.players.players" local players = require (wolfa_getLuaPath()..".players.players")
local stats = {} local stats = {}

View file

@ -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 "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local SEVERITY_LEVELS = { local SEVERITY_LEVELS = {
[1] = "^_", -- termination [1] = "^_", -- termination

View file

@ -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 "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = {} local events = {}

View file

@ -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 util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local settings = require "luamods.wolfadmin.util.settings" local settings = require (wolfa_getLuaPath()..".util.settings")
local files = {} local files = {}
@ -25,9 +25,9 @@ function files.ls(directory)
local entries = {} local entries = {}
if platform == "unix" then if platform == "unix" then
command = 'ls -1 "'..wolfa_getBasePath()..'luamods/wolfadmin/'..directory..'"' command = 'ls -1 "'..wolfa_getBasePath()..wolfa_getLuaPath():gsub("%.", "/").."/"..directory..'"'
elseif platform == "windows" then elseif platform == "windows" then
command = 'dir "'..wolfa_getBasePath()..'luamods/wolfadmin/'..directory..'" /b' command = 'dir "'..wolfa_getBasePath()..wolfa_getLuaPath():gsub("%.", "/").."/"..directory..'" /b'
end end
for filename in io.popen(command):lines() do for filename in io.popen(command):lines() do

View file

@ -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 util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local settings = {} local settings = {}
@ -73,7 +73,7 @@ function settings.load()
end end
end end
local files = require "luamods.wolfadmin.util.files" local files = require (wolfa_getLuaPath()..".util.files")
local amount, array = files.loadCFG("wolfadmin.cfg", "[a-z]+", true) local amount, array = files.loadCFG("wolfadmin.cfg", "[a-z]+", true)
for blocksname, settings in pairs(array) do for blocksname, settings in pairs(array) do

View file

@ -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 constants = require "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = require "luamods.wolfadmin.util.util" local util = require (wolfa_getLuaPath()..".util.util")
local events = require "luamods.wolfadmin.util.events" local events = require (wolfa_getLuaPath()..".util.events")
local tables = require "luamods.wolfadmin.util.tables" local tables = require (wolfa_getLuaPath()..".util.tables")
local timers = {} local timers = {}

View file

@ -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 "luamods.wolfadmin.util.constants" local constants = require (wolfa_getLuaPath()..".util.constants")
local util = {} local util = {}