From 6fbeff452f52bbf3829fd5079534d6c77f34add8 Mon Sep 17 00:00:00 2001 From: INSANEMODE Date: Sat, 14 Nov 2020 00:29:09 -0600 Subject: [PATCH] rename header file to match functions.cpp --- ClanTagRank.vcxproj | 2 +- ClanTagRank.vcxproj.filters | 4 ++-- dllmain.cpp | 2 +- functions.cpp | 9 +++++---- dllmain.h => functions.h | 0 5 files changed, 9 insertions(+), 8 deletions(-) rename dllmain.h => functions.h (100%) diff --git a/ClanTagRank.vcxproj b/ClanTagRank.vcxproj index ae4aba3..f975e43 100644 --- a/ClanTagRank.vcxproj +++ b/ClanTagRank.vcxproj @@ -164,7 +164,7 @@ - + diff --git a/ClanTagRank.vcxproj.filters b/ClanTagRank.vcxproj.filters index bcc35f4..ada9560 100644 --- a/ClanTagRank.vcxproj.filters +++ b/ClanTagRank.vcxproj.filters @@ -24,10 +24,10 @@ Header Files - + Header Files - + Header Files diff --git a/dllmain.cpp b/dllmain.cpp index 0f533ee..0a42f1f 100644 --- a/dllmain.cpp +++ b/dllmain.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "dllmain.h" +#include "functions.h" #include #include #include diff --git a/functions.cpp b/functions.cpp index 366419a..a5239ae 100644 --- a/functions.cpp +++ b/functions.cpp @@ -49,7 +49,7 @@ namespace Game std::string ClanTagRequest(std::string username) { std::string readBuffer; - const char* constClanTag; + //const char* constClanTag; if (username.length() >= 3) { readBuffer = testcurl(username); @@ -80,12 +80,13 @@ namespace Game int clientAddr{ 0x02347CD4 - 0x57F8 }; int clanTagAddr{ 0x6C }; int clientOffset{ 0x57F8 }; - //int client{ (clientAddr + clientOffset) }; //lol, that's not right. + + //loop through clients to get their name and current clan tag. for (int i = 1; i < 9; i++) { - memcpy((void*)currentname, (void*)((clientAddr + (clientOffset * i)), 16); + memcpy((void*)currentname, (void*)((clientAddr + (clientOffset * i))), 16); currentname_str = std::string(currentname, 16); - memcpy((void*)currentClanTag, (void*)(((clientAddr +(clientOffset * i)) + clanTagAddr), 8); + memcpy((void*)currentClanTag, (void*)(((clientAddr +(clientOffset * i)) + clanTagAddr)), 8); if ((strstr(currentClanTag, "Creator") == NULL) && (strstr(currentClanTag, "Admin") == NULL) && (strstr(currentClanTag, "Trusted") == NULL) && (strstr(currentClanTag, "Mod") == NULL) && (strstr(currentClanTag, "Owner") == NULL) && (strstr(currentClanTag, "3arc") == NULL) && (strncmp(currentname, emptyname, 16) != 0)) { changeClanTag_str = ClanTagRequest(currentname); diff --git a/dllmain.h b/functions.h similarity index 100% rename from dllmain.h rename to functions.h