Huge command system overhaul
This commit is contained in:
@@ -10,25 +10,12 @@
|
||||
|
||||
function initChatScript() {
|
||||
console.log("[Asshat.Chat]: Initializing chat script ...");
|
||||
addChatCommandHandlers();
|
||||
console.log("[Asshat.Chat]: Chat script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function addChatCommandHandlers() {
|
||||
console.log("[Asshat.Chat]: Adding chat command handlers ...");
|
||||
let chatCommands = serverCommands.chat;
|
||||
for(let i in chatCommands) {
|
||||
addCommandHandler(chatCommands[i].command, chatCommands[i].handlerFunction);
|
||||
}
|
||||
console.log("[Asshat.Chat]: Chat command handlers added successfully!");
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function meActionCommand(command, params, client) {
|
||||
if(doesCommandRequireLogin(command)) {
|
||||
if(!isClientLoggedIn(client)) {
|
||||
|
||||
Reference in New Issue
Block a user