diff --git a/Release/Plugins/RenX.Core.lib b/Release/Plugins/RenX.Core.lib index 5a57c2d..d74fa81 100644 Binary files a/Release/Plugins/RenX.Core.lib and b/Release/Plugins/RenX.Core.lib differ diff --git a/RenX.Core/RenX_Server.cpp b/RenX.Core/RenX_Server.cpp index e1b6b22..e2d2129 100644 --- a/RenX.Core/RenX_Server.cpp +++ b/RenX.Core/RenX_Server.cpp @@ -17,7 +17,6 @@ */ #include -#include #include "Jupiter/INIFile.h" #include "Jupiter/String.h" #include "ServerManager.h" @@ -1090,13 +1089,23 @@ unsigned int RenX::Server::triggerCommand(const Jupiter::ReadableString &trigger void RenX::Server::addCommand(RenX::GameCommand *command) { - RenX::Server::commands.add(command); + int access_level; + if (RenX::Server::commandAccessLevels != nullptr) { const Jupiter::ReadableString &accessLevel = RenX::Server::commandAccessLevels->get(command->getTrigger()); if (accessLevel.isNotEmpty()) - command->setAccessLevel(accessLevel.asInt()); + { + access_level = accessLevel.asInt(); + if (access_level < 0) // Disabled command + { + delete command; + return; + } + command->setAccessLevel(access_level); + } } + if (RenX::Server::commandAliases != nullptr) { const Jupiter::ReadableString &aliasList = RenX::Server::commandAliases->get(command->getTrigger()); @@ -1104,6 +1113,8 @@ void RenX::Server::addCommand(RenX::GameCommand *command) while (j != 0) command->addTrigger(Jupiter::ReferenceString::getWord(aliasList, --j, WHITESPACE)); } + + RenX::Server::commands.add(command); } bool RenX::Server::removeCommand(RenX::GameCommand *command) diff --git a/RenX.ModSystem/RenX_ModSystem.cpp b/RenX.ModSystem/RenX_ModSystem.cpp index beaf71c..838d45e 100644 --- a/RenX.ModSystem/RenX_ModSystem.cpp +++ b/RenX.ModSystem/RenX_ModSystem.cpp @@ -175,7 +175,7 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla if (player->access != 0) { server->sendMessage(player, Jupiter::StringS::Format("You are now authenticated with access level %d; group: %.*s.", player->access, group->name.size(), group->name.ptr())); - if (server->isDevBot()) + if (server->isDevBot() && player->access > 1) { if (server->getVersion() >= 4) server->sendData(Jupiter::StringS::Format("dset_dev %d\n", player->id)); diff --git a/RenXGameCommands.ini b/RenXGameCommands.ini index 9b49a12..96cfebe 100644 --- a/RenXGameCommands.ini +++ b/RenXGameCommands.ini @@ -16,8 +16,8 @@ [Default.Basic] irc=Please set or remove the "irc" command in Jupiter's RenXGameCommands.ini file. -ts=Please set or remove the "irc" command in Jupiter's RenXGameCommands.ini file. -web=Please set or remove the "irc" command in Jupiter's RenXGameCommands.ini file. +ts=Please set or remove the "ts" command in Jupiter's RenXGameCommands.ini file. +web=Please set or remove the "web" command in Jupiter's RenXGameCommands.ini file. [Server.Basic]