From c4daed0badfbaf03314d5b1e2b38fed112e5cedf Mon Sep 17 00:00:00 2001 From: momo5502 Date: Thu, 28 Jan 2016 17:30:32 +0100 Subject: [PATCH] Node stuff. --- src/Components/Modules/Network.cpp | 3 +++ src/Components/Modules/Node.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Network.cpp b/src/Components/Modules/Network.cpp index ac2dfa7f..14d46722 100644 --- a/src/Components/Modules/Network.cpp +++ b/src/Components/Modules/Network.cpp @@ -224,6 +224,9 @@ namespace Components Utils::Hook::Set(0x4AEF08, 0x1FFFC); Utils::Hook::Set(0x4AEFA3, 0x1FFFC); + // Parse port as short in Net_AddrToString + Utils::Hook::Set(0x4698E3, "%u.%u.%u.%u:%hu"); + // Install interception handler Utils::Hook(0x5AA709, Network::PacketInterceptionHandler, HOOK_CALL).Install()->Quick(); diff --git a/src/Components/Modules/Node.cpp b/src/Components/Modules/Node.cpp index b49b280a..8a580252 100644 --- a/src/Components/Modules/Node.cpp +++ b/src/Components/Modules/Node.cpp @@ -42,7 +42,7 @@ namespace Components void Node::AddNode(Network::Address address, bool valid) { - //if (address.IsLocal() || address.IsSelf()) return; + if (address.IsLocal() || address.IsSelf()) return; Node::NodeEntry entry; @@ -161,7 +161,7 @@ namespace Components Node::Node() { -#ifdef USE_NODE_STUFF +//#ifdef USE_NODE_STUFF Assert_Size(Node::AddressEntry, 6); Dvar::OnInit([] () @@ -286,7 +286,7 @@ namespace Components Node::AddNode(Network::Address(params[1])); }); -#endif +//#endif } Node::~Node()