From 5180d822f93aadf90e0a497edddab59cc4939180 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Thu, 23 Jun 2022 03:09:38 +0700 Subject: [PATCH] Fix char prefix not being colored in info query --- sources/InfoQueryHandler/InfoQueryHandler.uc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sources/InfoQueryHandler/InfoQueryHandler.uc b/sources/InfoQueryHandler/InfoQueryHandler.uc index 31070b0..84962d6 100644 --- a/sources/InfoQueryHandler/InfoQueryHandler.uc +++ b/sources/InfoQueryHandler/InfoQueryHandler.uc @@ -67,6 +67,7 @@ public final static function InfoQueryHandler_OnQuery_Slot OnHelp( Text header) { local InfoQueryHandler_OnQuery_Slot newSlot; + StaticConstructor(); newSlot = InfoQueryHandler_OnQuery_Slot( default.onHelpSignal.NewSlot(receiver)); @@ -87,6 +88,7 @@ public final static function InfoQueryHandler_OnQuery_Slot OnStatus( Text header) { local InfoQueryHandler_OnQuery_Slot newSlot; + StaticConstructor(); newSlot = InfoQueryHandler_OnQuery_Slot( default.onStatusSignal.NewSlot(receiver)); @@ -108,6 +110,7 @@ public final static function InfoQueryHandler_OnQuery_Slot OnVersion( Text header) { local InfoQueryHandler_OnQuery_Slot newSlot; + StaticConstructor(); newSlot = InfoQueryHandler_OnQuery_Slot( default.onVersionSignal.NewSlot(receiver)); @@ -129,6 +132,7 @@ public final static function InfoQueryHandler_OnQuery_Slot OnCredits( Text header) { local InfoQueryHandler_OnQuery_Slot newSlot; + StaticConstructor(); newSlot = InfoQueryHandler_OnQuery_Slot( default.onCreditsSignal.NewSlot(receiver)); @@ -224,12 +228,15 @@ private final static function StopOutput() private final static function OutAcediaHelp() { - local Text prefix; - local MutableText builder; + local MutableText prefix, builder; + default.currentOutput .Flush() .WriteLine(T(default.TACEDIA_HELP)); - prefix = class'Commands_Feature'.static.GetChatPrefix(); + prefix = class'Commands_Feature'.static + .GetChatPrefix() + .IntoMutableText() + .ChangeDefaultColor(__().color.TextEmphasis); if (!class'Commands_Feature'.static.IsEnabled()) { default.currentOutput.WriteLine(T(default.TACEDIA_HELP_COMMANDS_NO)); } @@ -306,7 +313,7 @@ defaultproperties TACEDIA_ACKNOWLEDGMENT = 11 stringConstants(11) = "Special thanks for NikC- and Chaos for suggestions, testing and discussion" TPREFIX = 12 - stringConstants(12) = "{$TextEmphasis %PREFIX%}" + stringConstants(12) = "%PREFIX%" TSEPARATOR = 13 stringConstants(13) = "=============================" } \ No newline at end of file