mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-28 15:02:12 +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
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local admin = {}
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 bits = require (wolfa_getLuaPath()..".util.bits")
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local timers = require (wolfa_getLuaPath()..".util.timers")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local bits = wolfa_requireModule("util.bits")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
local timers = wolfa_requireModule("util.timers")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local balancer = {}
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 timers = require (wolfa_getLuaPath()..".util.timers")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local timers = wolfa_requireModule("util.timers")
|
||||
|
||||
local mutes = {}
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local files = require (wolfa_getLuaPath()..".util.files")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local files = wolfa_requireModule("util.files")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
local toml = require "toml"
|
||||
local toml = wolfa_requireLib("toml")
|
||||
|
||||
local rules = {}
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
|
||||
local acl = {}
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
local auth = {}
|
||||
|
||||
|
@ -129,11 +129,11 @@ function auth.onGameInit()
|
|||
return
|
||||
end
|
||||
|
||||
srv = require (wolfa_getLuaPath()..".auth.acl")
|
||||
srv = wolfa_requireModule("auth.acl")
|
||||
|
||||
srv.readPermissions()
|
||||
else
|
||||
srv = require (wolfa_getLuaPath()..".auth.shrubbot")
|
||||
srv = wolfa_requireModule("auth.shrubbot")
|
||||
|
||||
srv.loadFlags(et.trap_Cvar_Get("fs_game"))
|
||||
end
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
local shrubbot = {}
|
||||
|
||||
local players = require (wolfa_getLuaPath()..".players.players")
|
||||
local players = wolfa_requireModule("players.players")
|
||||
|
||||
local flags
|
||||
|
||||
function shrubbot.loadFlags(mod)
|
||||
flags = require (wolfa_getLuaPath()..".auth.shrubbot."..mod)
|
||||
flags = wolfa_requireModule("auth.shrubbot."..mod)
|
||||
end
|
||||
|
||||
function shrubbot.isPlayerAllowed(clientId, permission)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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
|
||||
-- left by mod: fjlovyDHJOTY
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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
|
||||
-- left by mod: jlqyFHOQY
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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
|
||||
-- left by mod: fhjovyDHJOTY
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local level = auth.getPlayerLevel(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local balancer = require (wolfa_getLuaPath()..".admin.balancer")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local balancer = wolfa_requireModule("admin.balancer")
|
||||
|
||||
function commandBalance(clientId, command, action)
|
||||
if action == "enable" then
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 history = require (wolfa_getLuaPath()..".admin.history")
|
||||
local bans = wolfa_requireModule("admin.bans")
|
||||
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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandBan(clientId, command, victim, ...)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
math.randomseed(os.time())
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local voting = require (wolfa_getLuaPath()..".game.voting")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local voting = wolfa_requireModule("game.voting")
|
||||
|
||||
function commandEnableVote(clientId, command)
|
||||
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
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandGib(clientId, command, victim)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local greeting = greetings.get(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandHelp(clientId, command, cmd)
|
||||
local cmds = commands.getadmin()
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
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
|
||||
-- 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 history = require (wolfa_getLuaPath()..".admin.history")
|
||||
local admin = wolfa_requireModule("admin.admin")
|
||||
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, ...)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local bots = wolfa_requireModule("game.bots")
|
||||
|
||||
function commandBotsOff(clientId, command)
|
||||
bots.enable(false)
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 util = require (wolfa_getLuaPath()..".util.util")
|
||||
local pagination = wolfa_requireModule("util.pagination")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
function commandListAliases(clientId, command, victim, offset)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local maps = game.getMaps()
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 util = require (wolfa_getLuaPath()..".util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
function commandListPlayers(clientId, command)
|
||||
local playersOnline = {}
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
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
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
||||
local history = wolfa_requireModule("admin.history")
|
||||
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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandMute(clientId, command, victim, ...)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local bots = wolfa_requireModule("game.bots")
|
||||
|
||||
function commandBotsOn(clientId, command)
|
||||
bots.enable(true)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandNextMap(clientId, command)
|
||||
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
|
||||
-- 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)
|
||||
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
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandPlayerLock(clientId, command, victim, team)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local balancer = require (wolfa_getLuaPath()..".admin.balancer")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local bots = require (wolfa_getLuaPath()..".game.bots")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local balancer = wolfa_requireModule("admin.balancer")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local bots = wolfa_requireModule("game.bots")
|
||||
|
||||
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
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
settings.load()
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandReset(clientId, command)
|
||||
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
|
||||
-- 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 sprees = require (wolfa_getLuaPath()..".game.sprees")
|
||||
local game = wolfa_requireModule("game.game")
|
||||
local sprees = wolfa_requireModule("game.sprees")
|
||||
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandResetSprees(clientId, command, map)
|
||||
if not db.isConnected() then
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local game = require (wolfa_getLuaPath()..".game.game")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local game = wolfa_requireModule("game.game")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandRestart(clientId, command)
|
||||
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
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local rules = require (wolfa_getLuaPath()..".admin.rules")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local rules = wolfa_requireModule("admin.rules")
|
||||
|
||||
function commandRules(clientId, command, rule)
|
||||
if not rule then
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local admin = require (wolfa_getLuaPath()..".admin.admin")
|
||||
local history = require (wolfa_getLuaPath()..".admin.history")
|
||||
local admin = wolfa_requireModule("admin.admin")
|
||||
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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local pagination = wolfa_requireModule("util.pagination")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
function commandShowBans(clientId, offset)
|
||||
if not db.isConnected() then
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 pagination = require (wolfa_getLuaPath()..".util.pagination")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local pagination = wolfa_requireModule("util.pagination")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandListHistory(clientId, command, victim, offset)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandShuffle(clientId, command)
|
||||
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
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandShuffleSR(clientId, command)
|
||||
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
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandSlap(clientId, command, victim)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandSpec999(clientId, command)
|
||||
local count = 0
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
if not db.isConnected() then
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandSwap(clientId, command)
|
||||
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
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local auth = require (wolfa_getLuaPath()..".auth.auth")
|
||||
local commands = require (wolfa_getLuaPath()..".commands.commands")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local auth = wolfa_requireModule("auth.auth")
|
||||
local commands = wolfa_requireModule("commands.commands")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandTime(clientId, command)
|
||||
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
|
||||
-- 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)
|
||||
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
|
||||
-- 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 constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
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
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
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
|
||||
-- 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 mutes = require (wolfa_getLuaPath()..".admin.mutes")
|
||||
local history = wolfa_requireModule("admin.history")
|
||||
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, ...)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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, ...)
|
||||
local cmdClient
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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, ...)
|
||||
if not ... then
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local voteArguments = {}
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local logs = wolfa_requireModule("util.logs")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
function commandPersonalMessage(clientId, command, recipient, ...)
|
||||
if recipient and ... then
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 players = require (wolfa_getLuaPath()..".players.players")
|
||||
local logs = wolfa_requireModule("util.logs")
|
||||
local players = wolfa_requireModule("players.players")
|
||||
|
||||
function commandR(clientId, command, ...)
|
||||
if not ... then
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local logs = wolfa_requireModule("util.logs")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
local types = {
|
||||
["say"] = "chat",
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
function commandTeam(clientId, command)
|
||||
if players.isTeamLocked(clientId) then
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
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
|
||||
-- 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 events = require (wolfa_getLuaPath()..".util.events")
|
||||
local files = require (wolfa_getLuaPath()..".util.files")
|
||||
local logs = require (wolfa_getLuaPath()..".util.logs")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local files = wolfa_requireModule("util.files")
|
||||
local logs = wolfa_requireModule("util.logs")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
|
||||
local commands = {}
|
||||
|
||||
|
@ -96,7 +96,7 @@ function commands.loadFiles(dir)
|
|||
|
||||
for _, file in pairs(files) do
|
||||
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
|
||||
end
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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()
|
||||
for _, level in ipairs(acl.getLevels()) do
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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)
|
||||
local clientId = tonumber(clientId)
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
local db = {}
|
||||
|
||||
|
@ -32,9 +32,9 @@ end
|
|||
function db.oninit()
|
||||
if settings.get("db_type") ~= "none" 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
|
||||
con = require (wolfa_getLuaPath()..".db.mysql")
|
||||
con = wolfa_requireModule("db.mysql")
|
||||
else
|
||||
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
|
||||
-- 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 util = require (wolfa_getLuaPath()..".util.util")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
|
||||
local luasql = require "luasql.mysql"
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 util = require (wolfa_getLuaPath()..".util.util")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
|
||||
local luasql = require "luasql.sqlite3"
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local bots = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local players = require (wolfa_getLuaPath()..".players.players")
|
||||
local players = wolfa_requireModule("players.players")
|
||||
|
||||
local game = {}
|
||||
|
||||
|
|
|
@ -15,19 +15,19 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local files = require (wolfa_getLuaPath()..".util.files")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local bits = wolfa_requireModule("util.bits")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local files = wolfa_requireModule("util.files")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
|
||||
local toml = require "toml"
|
||||
local toml = wolfa_requireLib("toml")
|
||||
|
||||
local sprees = {}
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
|
||||
local teams = {}
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 events = require (wolfa_getLuaPath()..".util.events")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local timers = require (wolfa_getLuaPath()..".util.timers")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local timers = wolfa_requireModule("util.timers")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local voting = {}
|
||||
|
||||
|
|
|
@ -55,7 +55,8 @@ local release = "4 January 2019"
|
|||
|
||||
local basepath
|
||||
local homepath
|
||||
local luapath
|
||||
local lualibspath
|
||||
local luamodspath
|
||||
|
||||
-- need to do this somewhere else
|
||||
function wolfa_getVersion()
|
||||
|
@ -74,53 +75,70 @@ function wolfa_getHomePath()
|
|||
return homepath
|
||||
end
|
||||
|
||||
function wolfa_getLuaPath()
|
||||
return luapath
|
||||
function wolfa_getLuaLibsPath()
|
||||
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
|
||||
|
||||
function et_InitGame(levelTime, randomSeed, restartMap)
|
||||
-- set up paths
|
||||
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").."/"
|
||||
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
|
||||
require (wolfa_getLuaPath()..".util.debug")
|
||||
wolfa_requireModule("util.debug")
|
||||
|
||||
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")
|
||||
admin = wolfa_requireModule("admin.admin")
|
||||
balancer = wolfa_requireModule("admin.balancer")
|
||||
bans = wolfa_requireModule("admin.bans")
|
||||
history = wolfa_requireModule("admin.history")
|
||||
mutes = wolfa_requireModule("admin.mutes")
|
||||
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")
|
||||
game = require (wolfa_getLuaPath()..".game.game")
|
||||
fireteams = require (wolfa_getLuaPath()..".game.fireteams")
|
||||
sprees = require (wolfa_getLuaPath()..".game.sprees")
|
||||
teams = require (wolfa_getLuaPath()..".game.teams")
|
||||
voting = require (wolfa_getLuaPath()..".game.voting")
|
||||
bots = wolfa_requireModule("game.bots")
|
||||
game = wolfa_requireModule("game.game")
|
||||
fireteams = wolfa_requireModule("game.fireteams")
|
||||
sprees = wolfa_requireModule("game.sprees")
|
||||
teams = wolfa_requireModule("game.teams")
|
||||
voting = wolfa_requireModule("game.voting")
|
||||
|
||||
greetings = require (wolfa_getLuaPath()..".players.greetings")
|
||||
players = require (wolfa_getLuaPath()..".players.players")
|
||||
stats = require (wolfa_getLuaPath()..".players.stats")
|
||||
greetings = wolfa_requireModule("players.greetings")
|
||||
players = wolfa_requireModule("players.players")
|
||||
stats = wolfa_requireModule("players.stats")
|
||||
|
||||
bits = require (wolfa_getLuaPath()..".util.bits")
|
||||
constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
events = require (wolfa_getLuaPath()..".util.events")
|
||||
files = require (wolfa_getLuaPath()..".util.files")
|
||||
logs = require (wolfa_getLuaPath()..".util.logs")
|
||||
pagination = require (wolfa_getLuaPath()..".util.pagination")
|
||||
settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
timers = require (wolfa_getLuaPath()..".util.timers")
|
||||
util = require (wolfa_getLuaPath()..".util.util")
|
||||
bits = wolfa_requireModule("util.bits")
|
||||
constants = wolfa_requireModule("util.constants")
|
||||
events = wolfa_requireModule("util.events")
|
||||
files = wolfa_requireModule("util.files")
|
||||
logs = wolfa_requireModule("util.logs")
|
||||
pagination = wolfa_requireModule("util.pagination")
|
||||
settings = wolfa_requireModule("util.settings")
|
||||
tables = wolfa_requireModule("util.tables")
|
||||
timers = wolfa_requireModule("util.timers")
|
||||
util = wolfa_requireModule("util.util")
|
||||
|
||||
-- register the module
|
||||
et.RegisterModname("WolfAdmin "..wolfa_getVersion())
|
||||
|
|
|
@ -15,19 +15,19 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 util = require (wolfa_getLuaPath()..".util.util")
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local settings = require (wolfa_getLuaPath()..".util.settings")
|
||||
local files = require (wolfa_getLuaPath()..".util.files")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local settings = wolfa_requireModule("util.settings")
|
||||
local files = wolfa_requireModule("util.files")
|
||||
|
||||
local toml = require "toml"
|
||||
local toml = wolfa_requireLib("toml")
|
||||
|
||||
local greetings = {}
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 events = require (wolfa_getLuaPath()..".util.events")
|
||||
local bits = wolfa_requireModule("util.bits")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
|
||||
local players = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {
|
||||
[1] = "^_", -- termination
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local constants = require (wolfa_getLuaPath()..".util.constants")
|
||||
local util = require (wolfa_getLuaPath()..".util.util")
|
||||
local constants = wolfa_requireModule("util.constants")
|
||||
local util = wolfa_requireModule("util.util")
|
||||
|
||||
local events = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
@ -24,9 +24,9 @@ function files.ls(directory)
|
|||
local entries = {}
|
||||
|
||||
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
|
||||
command = 'dir "'..wolfa_getBasePath()..wolfa_getLuaPath():gsub("%.", "/").."/"..directory..'" /b'
|
||||
command = 'dir "'..wolfa_getBasePath()..wolfa_getLuaModsPath():gsub("%.", "/").."/"..directory..'" /b'
|
||||
end
|
||||
|
||||
for filename in io.popen(command):lines() do
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local toml = require "toml"
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local toml = wolfa_requireLib("toml")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
|
||||
local settings = {}
|
||||
|
||||
|
@ -159,7 +159,7 @@ function settings.load()
|
|||
-- compatibility for 1.1.* and lower
|
||||
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]+")
|
||||
|
||||
for blocksname, settings in pairs(array) do
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local events = require (wolfa_getLuaPath()..".util.events")
|
||||
local tables = require (wolfa_getLuaPath()..".util.tables")
|
||||
local events = wolfa_requireModule("util.events")
|
||||
local tables = wolfa_requireModule("util.tables")
|
||||
|
||||
local timers = {}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
-- You should have received a copy of the GNU General Public License
|
||||
-- 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 = {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue