Skip to content

Commit

Permalink
upgrade the horrible errors to critical in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
RubberDuckShobe committed Oct 30, 2023
1 parent 2f76e6d commit 6d3287e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion include/nethook.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace wavebreaker
g_httpopenrequesta_hook = safetyhook::create_inline((void *)HttpOpenRequestA, (void *)OpenRequestHook);
if (!g_getserver_hook || !g_getserverunicode_hook || !g_internetconnecta_hook || !g_httpopenrequesta_hook)
{
spdlog::error("Failed to attach hook(s). Hook addresses: {0:p} {1:p} {2:p} {3:p}", fmt::ptr(&g_getserver_hook), fmt::ptr(&g_getserverunicode_hook), fmt::ptr(&g_internetconnecta_hook), fmt::ptr(&g_httpopenrequesta_hook));
spdlog::critical("Failed to attach hook(s). Hook addresses: {0:p} {1:p} {2:p} {3:p}", fmt::ptr(&g_getserver_hook), fmt::ptr(&g_getserverunicode_hook), fmt::ptr(&g_internetconnecta_hook), fmt::ptr(&g_httpopenrequesta_hook));
throw std::runtime_error("Hook failed");
}
}
Expand Down
31 changes: 0 additions & 31 deletions include/utility.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ uint32_t __stdcall init(void *args)
spdlog::set_default_logger(logger);
spdlog::set_level(spdlog::level::info);
spdlog::flush_on(spdlog::level::debug);
spdlog::info("Init");
spdlog::info("Initializing Wavebreaker client.");

try
{
wavebreaker::config::init();
}
catch (const std::exception &e)
{
spdlog::error("Exception thrown when loading config: {}", e.what());
spdlog::critical("Exception thrown when loading config: {}", e.what());
MessageBoxA(nullptr, "Wavebreaker client config error!", "Error", MB_OK | MB_ICONERROR);
return 1;
}
Expand All @@ -42,7 +42,7 @@ uint32_t __stdcall init(void *args)
}

while (!GetModuleHandleA("HTTP_Fetch_Unicode.dll") || !GetModuleHandleA("17C5B19F-4273-423C-A158-CA6F73046D43.dll"))
Sleep(100);
Sleep(125);

try
{
Expand Down

0 comments on commit 6d3287e

Please sign in to comment.