From f010f07fa61143c557b3b7ebd128d965b15436ad Mon Sep 17 00:00:00 2001 From: LightCat Date: Sun, 14 Oct 2018 17:48:30 +0200 Subject: [PATCH] more irc upgrades --- src/irc.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/irc.cpp b/src/irc.cpp index 496a7222..0ffeec01 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -265,19 +265,18 @@ void auth(bool reply) static bool restarting{ false }; +Timer calledonce{}; static HookedFunction paint(HookedFunctions_types::HF_Paint, "IRC", 16, []() { if (!restarting) { - if (last_sent_steamid.check(8000) && !last_sent_steamid.check(9500)) + if (last_sent_steamid.check(8000) && calledonce.test_and_set(2000)) { static uintptr_t addr = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC ? 8B 7D ? 8B 77 ? 85 F6 0F 84"); typedef int (*GetNumOnlineMembers_t)(re::CTFPartyClient *); auto GetNumOnlineMembers_fn = GetNumOnlineMembers_t(addr); auto party_client = re::CTFPartyClient::GTFPartyClient(); if (party_client && GetNumOnlineMembers_fn(party_client) != 6 && !steamidvec.empty()) - { hack::command_stack().push("tf_party_leave"); - } } if (last_steamid_received.test_and_set(10000)) {