Move server commands back into data table.
This commit is contained in:
@@ -8,7 +8,33 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let serverCommands = {
|
||||
let serverCommands = [];
|
||||
|
||||
let builtInCommands = [
|
||||
"refresh",
|
||||
"restart",
|
||||
"stop",
|
||||
"start",
|
||||
"reconnect",
|
||||
"setname",
|
||||
"connect",
|
||||
"disconnect",
|
||||
"say",
|
||||
"dumpdoc",
|
||||
];
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function initCommandScript() {
|
||||
console.log("[Asshat.Command]: Initializing commands script ...");
|
||||
serverCommands = loadCommands();
|
||||
console.log("[Asshat.Command]: Initialized commands script!");
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function loadCommands() {
|
||||
return {
|
||||
account: [
|
||||
commandData("login", loginCommand, "<password>", getStaffFlagValue("none"), false, false),
|
||||
commandData("register", registerCommand, "<password>", getStaffFlagValue("none"), false, false),
|
||||
@@ -267,12 +293,6 @@ let serverCommands = {
|
||||
|
||||
],
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function initCommandScript() {
|
||||
console.log("[Asshat.Command]: Initializing commands script ...");
|
||||
console.log("[Asshat.Command]: Initialized commands script!");
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -293,6 +313,12 @@ function getCommand(command) {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function getCommandData(command) {
|
||||
return getCommand(command);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function getCommands() {
|
||||
return serverCommands;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user