ConCommand: use FCVAR_GAMEDLL flags for several server commands.

These could only be ran if the server is running, and allows for running them as ServerCommand.
This commit is contained in:
Kawe Mazidjatari 2022-09-05 23:02:54 +02:00
parent 04d4c64107
commit 954165c2ea

View File

@ -332,12 +332,12 @@ void ConCommand::Init(void)
//-------------------------------------------------------------------------
// SERVER DLL |
#ifndef CLIENT_DLL
ConCommand::Create("script", "Run input code as SERVER script on the VM.", FCVAR_CHEAT, SQVM_ServerScript_f, nullptr);
ConCommand::Create("sv_kick", "Kick a client from the server by user name. | Usage: sv_kick \"<UserID>\".", FCVAR_RELEASE, Host_Kick_f, nullptr);
ConCommand::Create("sv_kickid", "Kick a client from the server by handle or platform id | Usage: sv_kickid \"<HandleID>\"/\"<NucleusID>\".", FCVAR_RELEASE, Host_KickID_f, nullptr);
ConCommand::Create("sv_ban", "Bans a client from the server by user name. | Usage: sv_ban <UserID>.", FCVAR_RELEASE, Host_Ban_f, nullptr);
ConCommand::Create("sv_banid", "Bans a client from the server by handle, platform id or ip address | Usage: sv_banid \"<HandleID>\"/\"<NucleusID>/<IPAddress>\".", FCVAR_RELEASE, Host_BanID_f, nullptr);
ConCommand::Create("sv_unban", "Unbans a client from the server by platform id or ip address | Usage: sv_unban \"<NucleusID>\"/\"<IPAddress>\".", FCVAR_RELEASE, Host_Unban_f, nullptr);
ConCommand::Create("script", "Run input code as SERVER script on the VM.", FCVAR_GAMEDLL | FCVAR_CHEAT, SQVM_ServerScript_f, nullptr);
ConCommand::Create("sv_kick", "Kick a client from the server by user name. | Usage: sv_kick \"<UserID>\".", FCVAR_GAMEDLL | FCVAR_RELEASE, Host_Kick_f, nullptr);
ConCommand::Create("sv_kickid", "Kick a client from the server by handle or nucleus id | Usage: sv_kickid \"<HandleID>\"/\"<NucleusID>\".", FCVAR_GAMEDLL | FCVAR_RELEASE, Host_KickID_f, nullptr);
ConCommand::Create("sv_ban", "Bans a client from the server by user name. | Usage: sv_ban <UserID>.", FCVAR_GAMEDLL | FCVAR_RELEASE, Host_Ban_f, nullptr);
ConCommand::Create("sv_banid", "Bans a client from the server by handle, nucleus id or ip address | Usage: sv_banid \"<HandleID>\"/\"<NucleusID>/<IPAddress>\".", FCVAR_GAMEDLL | FCVAR_RELEASE, Host_BanID_f, nullptr);
ConCommand::Create("sv_unban", "Unbans a client from the server by nucleus id or ip address | Usage: sv_unban \"<NucleusID>\"/\"<IPAddress>\".", FCVAR_RELEASE, Host_Unban_f, nullptr);
ConCommand::Create("sv_reloadbanlist", "Reloads the ban list from the disk.", FCVAR_RELEASE, Host_ReloadBanList_f, nullptr);
#endif // !CLIENT_DLL
#ifndef DEDICATED