aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmma Miler <27428383+emma-miler@users.noreply.github.com>2022-02-08 02:42:00 +0100
committerBarichello <artur@barichello.me>2022-02-12 15:35:59 -0300
commit8d49e4ea5645a6b5330d476a6ee259a46b5d00a5 (patch)
tree82472c7416f6cd369340c999136861923938d3b9
parentdb0af63704a6fbc57e80a9db01bbc01b79339d9f (diff)
downloadNorthstarLauncher-8d49e4ea5645a6b5330d476a6ee259a46b5d00a5.tar.gz
NorthstarLauncher-8d49e4ea5645a6b5330d476a6ee259a46b5d00a5.zip
Fixed typo and made command line flag lowercase
-rw-r--r--NorthstarDedicatedTest/serverauthentication.cpp16
1 files 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<LPVOID*>(&CServerGameDLL__OnRecievedSayTextMessage));
+ hook, (char*)baseAddress + 0x1595C0, &CServerGameDLL__OnReceivedSayTextMessageHook,
+ reinterpret_cast<LPVOID*>(&CServerGameDLL__OnReceivedSayTextMessage));
g_ServerSquirrelManager->AddFuncRegistration("void", "NSSetMessage", "string message, int playerId, int channelId, bool shouldBlock", "", setMessage);