From 3e48e746db64a68058fc47bd03065f1e0c070d71 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 12 May 2022 01:07:48 +0200 Subject: [PATCH] Cleanup some strings --- r5dev/public/bansystem.cpp | 2 +- r5dev/server/server.cpp | 4 ++-- r5dev/tier1/IConVar.cpp | 2 +- r5dev/tier1/cmd.cpp | 6 +++--- r5dev/vstdlib/completion.cpp | 12 ++++++------ 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/r5dev/public/bansystem.cpp b/r5dev/public/bansystem.cpp index 222f7bf0..e3a90aa3 100644 --- a/r5dev/public/bansystem.cpp +++ b/r5dev/public/bansystem.cpp @@ -216,7 +216,7 @@ void CBanSystem::BanListCheck(void) std::string svIpAddress = pNetChan->GetAddress(); - Warning(eDLL_T::SERVER, "Connection rejected for '%s' ('%lld' is banned from this Server!)\n", svIpAddress.c_str(), pClient->GetOriginID()); + Warning(eDLL_T::SERVER, "Connection rejected for '%s' ('%lld' is banned from this server!)\n", svIpAddress.c_str(), pClient->GetOriginID()); AddEntry(svIpAddress, pClient->GetOriginID()); // Add local entry to reserve a non needed request. Save(); // Save banlist to file. NET_DisconnectClient(pClient, c, vsvrefuseList[i].first.c_str(), 0, 1); diff --git a/r5dev/server/server.cpp b/r5dev/server/server.cpp index 0ef67141..9572581b 100644 --- a/r5dev/server/server.cpp +++ b/r5dev/server/server.cpp @@ -46,11 +46,11 @@ void* HCServer_Authenticate(void* pServer, user_creds* pInpacket) { if (g_pBanSystem->IsBanned(svIpAddress, pInpacket->m_nNucleusID)) // Is the client trying to connect banned? { - CServer_RejectConnection(pServer, *(unsigned int*)((std::uintptr_t)pServer + 0xC), pInpacket, "You have been banned from this Server."); // RejectConnection for the client. + CServer_RejectConnection(pServer, *(unsigned int*)((std::uintptr_t)pServer + 0xC), pInpacket, "You have been banned from this server."); // RejectConnection for the client. if (sv_showconnecting->GetBool()) { - Warning(eDLL_T::SERVER, "Connection rejected for '%s' ('%lld' is banned from this Server!)\n", svIpAddress.c_str(), pInpacket->m_nNucleusID); + Warning(eDLL_T::SERVER, "Connection rejected for '%s' ('%lld' is banned from this server!)\n", svIpAddress.c_str(), pInpacket->m_nNucleusID); } return nullptr; } diff --git a/r5dev/tier1/IConVar.cpp b/r5dev/tier1/IConVar.cpp index f0b02a9f..a18abc67 100644 --- a/r5dev/tier1/IConVar.cpp +++ b/r5dev/tier1/IConVar.cpp @@ -69,7 +69,7 @@ void ConVar::Init(void) const navmesh_always_reachable = new ConVar("navmesh_always_reachable" , "1", FCVAR_DEVELOPMENTONLY, "Marks poly from agent to target on navmesh as reachable regardless of table data ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr); // !TODO: Default to '0' once the reachability table gets properly parsed. sv_showconnecting = new ConVar("sv_showconnecting" , "1", FCVAR_RELEASE, "Logs information about the connecting client to the console.", false, 0.f, false, 0.f, nullptr, nullptr); - sv_pylonvisibility = new ConVar("sv_pylonvisibility", "0", FCVAR_RELEASE, "Determines the visiblity to the Pylon Master Server, 0 = Not visible, 1 = Visible, 2 = Hidden !TODO: not implemented yet.", false, 0.f, false, 0.f, nullptr, nullptr); + sv_pylonvisibility = new ConVar("sv_pylonvisibility", "0", FCVAR_RELEASE, "Determines the visiblity to the Pylon master server, 0 = Not visible, 1 = Visible, 2 = Hidden !TODO: not implemented yet.", false, 0.f, false, 0.f, nullptr, nullptr); sv_pylonRefreshInterval = new ConVar("sv_pylonRefreshInterval" , "5.0", FCVAR_RELEASE, "Pylon server host request post update interval (seconds).", true, 2.f, true, 8.f, nullptr, nullptr); sv_banlistRefreshInterval = new ConVar("sv_banlistRefreshInterval", "1.0", FCVAR_RELEASE, "Banlist refresh interval (seconds).", true, 1.f, false, 0.f, nullptr, nullptr); sv_statusRefreshInterval = new ConVar("sv_statusRefreshInterval" , "0.5", FCVAR_RELEASE, "Server status bar update interval (seconds).", false, 0.f, false, 0.f, nullptr, nullptr); diff --git a/r5dev/tier1/cmd.cpp b/r5dev/tier1/cmd.cpp index 8e2af95f..64496300 100644 --- a/r5dev/tier1/cmd.cpp +++ b/r5dev/tier1/cmd.cpp @@ -123,10 +123,10 @@ void ConCommand::Init(void) // SERVER DLL | new ConCommand("script", "Run input code as SERVER script on the VM.", FCVAR_GAMEDLL | FCVAR_CHEAT, _SQVM_ServerScript_f_CompletionFunc, nullptr); new ConCommand("sv_kick", "Kick a client from the server by name. | Usage: kick \"\".", FCVAR_RELEASE, _Kick_f_CompletionFunc, nullptr); - new ConCommand("sv_kickid", "Kick a client from the server by UserID or OriginID | Usage: kickid \"\"/\"\".", FCVAR_RELEASE, _KickID_f_CompletionFunc, nullptr); + new ConCommand("sv_kickid", "Kick a client from the server by UserID or OriginID | Usage: kickid \"\"/\"\".", FCVAR_RELEASE, _KickID_f_CompletionFunc, nullptr); new ConCommand("sv_ban", "Bans a client from the server by name. | Usage: ban .", FCVAR_RELEASE, _Ban_f_CompletionFunc, nullptr); - new ConCommand("sv_banid", "Bans a client from the server by OriginID, UserID or IPAddress | Usage: banid \"\"/\"/\".", FCVAR_RELEASE, _BanID_f_CompletionFunc, nullptr); - new ConCommand("sv_unban", "Unbans a client from the Server by IPAddress or OriginID | Usage: unban \"\"/\"\".", FCVAR_RELEASE, _Unban_f_CompletionFunc, nullptr); + new ConCommand("sv_banid", "Bans a client from the server by UserID, OriginID or IPAddress | Usage: banid \"\"/\"/\".", FCVAR_RELEASE, _BanID_f_CompletionFunc, nullptr); + new ConCommand("sv_unban", "Unbans a client from the server by OriginID or IPAddress | Usage: unban \"\"/\"\".", FCVAR_RELEASE, _Unban_f_CompletionFunc, nullptr); new ConCommand("sv_reloadbanlist", "Reloads the ban list from the disk.", FCVAR_RELEASE, _ReloadBanList_f_CompletionFunc, nullptr); #ifndef DEDICATED //------------------------------------------------------------------------- diff --git a/r5dev/vstdlib/completion.cpp b/r5dev/vstdlib/completion.cpp index e3f531fd..a6e80549 100644 --- a/r5dev/vstdlib/completion.cpp +++ b/r5dev/vstdlib/completion.cpp @@ -87,7 +87,7 @@ void _Kick_f_CompletionFunc(const CCommand& args) continue; } - NET_DisconnectClient(pClient, i, "Kicked from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Kicked from server", 0, 1); } } @@ -138,7 +138,7 @@ void _KickID_f_CompletionFunc(const CCommand& args) } } - NET_DisconnectClient(pClient, i, "Kicked from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Kicked from server", 0, 1); } else { @@ -147,7 +147,7 @@ void _KickID_f_CompletionFunc(const CCommand& args) continue; } - NET_DisconnectClient(pClient, i, "Kicked from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Kicked from server", 0, 1); } } } @@ -196,7 +196,7 @@ void _Ban_f_CompletionFunc(const CCommand& args) g_pBanSystem->AddEntry(svIpAddress, pClient->GetOriginID()); g_pBanSystem->Save(); - NET_DisconnectClient(pClient, i, "Banned from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Banned from server", 0, 1); } } @@ -249,7 +249,7 @@ void _BanID_f_CompletionFunc(const CCommand& args) g_pBanSystem->AddEntry(svIpAddress, pClient->GetOriginID()); g_pBanSystem->Save(); - NET_DisconnectClient(pClient, i, "Banned from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Banned from server", 0, 1); } else { @@ -260,7 +260,7 @@ void _BanID_f_CompletionFunc(const CCommand& args) g_pBanSystem->AddEntry(svIpAddress, pClient->GetOriginID()); g_pBanSystem->Save(); - NET_DisconnectClient(pClient, i, "Banned from Server", 0, 1); + NET_DisconnectClient(pClient, i, "Banned from server", 0, 1); } } }