From 9044a581c072a17b138bb73625c1857c905f1611 Mon Sep 17 00:00:00 2001 From: FreezeEngine Date: Sun, 21 Jul 2024 14:38:51 +0300 Subject: [PATCH] Update 2 --- .../Module/Modules/Nick/NickListener.hpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Client/Module/Modules/Nick/NickListener.hpp b/src/Client/Module/Modules/Nick/NickListener.hpp index d8e1832f..295caeae 100644 --- a/src/Client/Module/Modules/Nick/NickListener.hpp +++ b/src/Client/Module/Modules/Nick/NickListener.hpp @@ -16,17 +16,17 @@ class NickListener : public Listener { static inline std::string backupOri; void onRaknetTick(RaknetTickEvent &event) override { - if (module->isEnabled()) { - std::string serverIP = SDK::getServerIP(); - if(serverIP.find("cubecraft") != std::string::npos) { - if(!module->restricted) { - FlarialGUI::Notify("Can't use Nick on " + serverIP); // TODO: move restrictions to API - module->restricted = true; - } - } else { - module->restricted = false; - } - } +// if (module->isEnabled()) { +// std::string serverIP = SDK::getServerIP(); +// if(serverIP.find("cubecraft") != std::string::npos) { +// if(!module->restricted) { +// FlarialGUI::Notify("Can't use Nick on " + serverIP); // TODO: move restrictions to API +// module->restricted = true; +// } +// } else { +// module->restricted = false; +// } +// } } void onDrawText(DrawTextEvent &event) override { @@ -39,7 +39,7 @@ class NickListener : public Listener { if (pos != std::string::npos) { std::string faketxt = *event.getText(); faketxt.replace(pos, localPlayerName.length(), - module->settings.getSettingByName("nick")->value); + "§o"+Utils::removeColorCodes(module->settings.getSettingByName("nick")->value)); *event.getText() = faketxt; } } @@ -64,7 +64,7 @@ class NickListener : public Listener { if (enabled && !module->restricted) { - std::string val = module->settings.getSettingByName("nick")->value; + std::string val = "§o"+Utils::removeColorCodes(module->settings.getSettingByName("nick")->value); SDK::clientInstance->getLocalPlayer()->setNametag(&val); SDK::clientInstance->getLocalPlayer()->playerName = val;