From d8f185be01f55c7b9f55d64c270f4ca96052bcfc Mon Sep 17 00:00:00 2001 From: Emma Miler <27428383+emma-miler@users.noreply.github.com> Date: Tue, 8 Feb 2022 02:42:00 +0100 Subject: Fixed typo and made command line flag lowercase --- NorthstarDedicatedTest/serverauthentication.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/NorthstarDedicatedTest/serverauthentication.cpp b/NorthstarDedicatedTest/serverauthentication.cpp index e0d4207e..b0ae2fb7 100644 --- a/NorthstarDedicatedTest/serverauthentication.cpp +++ b/NorthstarDedicatedTest/serverauthentication.cpp @@ -45,8 +45,8 @@ CBaseClient__SendServerInfoType CBaseClient__SendServerInfo; typedef bool (*ProcessConnectionlessPacketType)(void* a1, netpacket_t* packet); ProcessConnectionlessPacketType ProcessConnectionlessPacket; -typedef void (*CServerGameDLL__OnRecievedSayTextMessageType)(void* self, unsigned int senderClientIndex, const char* message, char unknown); -CServerGameDLL__OnRecievedSayTextMessageType CServerGameDLL__OnRecievedSayTextMessage; +typedef void (*CServerGameDLL__OnReceivedSayTextMessageType)(void* self, unsigned int senderClientIndex, const char* message, char unknown); +CServerGameDLL__OnReceivedSayTextMessageType CServerGameDLL__OnReceivedSayTextMessage; typedef void (*ConCommand__DispatchType)(ConCommand* command, const CCommand& args, void* a3); ConCommand__DispatchType ConCommand__Dispatch; @@ -543,7 +543,7 @@ SQRESULT setMessage(void* sqvm) return SQRESULT_NOTNULL; } -void CServerGameDLL__OnRecievedSayTextMessageHook(void* self, unsigned int senderClientIndex, const char* message, int channelId) +void CServerGameDLL__OnReceivedSayTextMessageHook(void* self, unsigned int senderClientIndex, const char* message, int channelId) { void* sender = GetPlayerByIndex(senderClientIndex - 1); // senderClientIndex starts at 1 @@ -559,7 +559,7 @@ void CServerGameDLL__OnRecievedSayTextMessageHook(void* self, unsigned int sende g_ServerAuthenticationManager->m_additionalPlayerData[sender].sayTextLimitCount++; - bool shouldDoChathooks = strstr(GetCommandLineA(), "-enableChatHooks"); + bool shouldDoChathooks = strstr(GetCommandLineA(), "-enablechathooks"); if (shouldDoChathooks) { @@ -572,12 +572,12 @@ void CServerGameDLL__OnRecievedSayTextMessageHook(void* self, unsigned int sende g_ServerSquirrelManager->ExecuteCode("CServerGameDLL_ProcessMessageStartThread()"); if (!shouldBlock && currentPlayerId + 1 == senderClientIndex) // stop player id spoofing from server { - CServerGameDLL__OnRecievedSayTextMessage(self, currentPlayerId + 1, currentMessage.c_str(), currentChannelId); + CServerGameDLL__OnReceivedSayTextMessage(self, currentPlayerId + 1, currentMessage.c_str(), currentChannelId); } } else { - CServerGameDLL__OnRecievedSayTextMessage(self, senderClientIndex, message, channelId); + CServerGameDLL__OnReceivedSayTextMessage(self, senderClientIndex, message, channelId); } } @@ -719,8 +719,8 @@ void InitialiseServerAuthenticationServerDLL(HMODULE baseAddress) { HookEnabler hook; ENABLER_CREATEHOOK( - hook, (char*)baseAddress + 0x1595C0, &CServerGameDLL__OnRecievedSayTextMessageHook, - reinterpret_cast(&CServerGameDLL__OnRecievedSayTextMessage)); + hook, (char*)baseAddress + 0x1595C0, &CServerGameDLL__OnReceivedSayTextMessageHook, + reinterpret_cast(&CServerGameDLL__OnReceivedSayTextMessage)); g_ServerSquirrelManager->AddFuncRegistration("void", "NSSetMessage", "string message, int playerId, int channelId, bool shouldBlock", "", setMessage); -- cgit v1.2.3