DEBUG: Print All IPs Passed To IsBanned

This commit is contained in:
TheBrokenRail 2020-10-11 00:15:44 -04:00
parent c756153cfb
commit 0936cd4700

View File

@ -167,6 +167,11 @@ static void Gui_addMessage_injection(unsigned char *gui, std::string const& text
revert_overwrite((void *) Gui_addMessage, Gui_addMessage_original);
}
static uint32_t RakNet_RakPeer_IsBanned_injection(__attribute__((unused)) unsigned char *rak_peer, __attribute__((unused)) char const *ip) {
INFO("%s", ip);
return 0;
}
static void exit_handler(__attribute__((unused)) int data) {
INFO("%s", "Stopping Server");
if (stored_minecraft != NULL) {
@ -234,4 +239,6 @@ void server_init() {
signal(SIGINT, exit_handler);
// Print Chat To Log
Gui_addMessage_original = overwrite((void *) Gui_addMessage, (void *) Gui_addMessage_injection);
// Allow All IPs To Join
overwrite((void *) 0xda3b4, (void *) RakNet_RakPeer_IsBanned_injection);
}