mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
ConsoleIO: fix timestamp & BasicIO-NoColor (#2076)
* ConsoleIO: correct BasicIO-NoColor handling We need color code stripped string in place of original string, not appending to it * ConsoleIO: fix timestamp order Timestamp should come before the string, not after. * ConsoleIO: check BasicIO-NoColor only when BasicIO
This commit is contained in:
parent
a8bbb1ac76
commit
78dd3ea17e
1 changed files with 11 additions and 10 deletions
|
|
@ -123,14 +123,6 @@ namespace MinecraftClient
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(str))
|
if (!String.IsNullOrEmpty(str))
|
||||||
{
|
{
|
||||||
if (!acceptnewlines)
|
|
||||||
{
|
|
||||||
output.Append(str.Replace('\n', ' '));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
output.Append(str);
|
|
||||||
}
|
|
||||||
if (displayTimestamp == null)
|
if (displayTimestamp == null)
|
||||||
{
|
{
|
||||||
displayTimestamp = EnableTimestamps;
|
displayTimestamp = EnableTimestamps;
|
||||||
|
|
@ -140,15 +132,24 @@ namespace MinecraftClient
|
||||||
int hour = DateTime.Now.Hour, minute = DateTime.Now.Minute, second = DateTime.Now.Second;
|
int hour = DateTime.Now.Hour, minute = DateTime.Now.Minute, second = DateTime.Now.Second;
|
||||||
output.Append(String.Format("{0}:{1}:{2} ", hour.ToString("00"), minute.ToString("00"), second.ToString("00")));
|
output.Append(String.Format("{0}:{1}:{2} ", hour.ToString("00"), minute.ToString("00"), second.ToString("00")));
|
||||||
}
|
}
|
||||||
|
if (!acceptnewlines)
|
||||||
|
{
|
||||||
|
str = str.Replace('\n', ' ');
|
||||||
|
}
|
||||||
if (BasicIO)
|
if (BasicIO)
|
||||||
{
|
{
|
||||||
if (BasicIO_NoColor)
|
if (BasicIO_NoColor)
|
||||||
{
|
{
|
||||||
output.Append(ChatBot.GetVerbatim(str));
|
output.Append(ChatBot.GetVerbatim(str));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
output.Append(str);
|
||||||
|
}
|
||||||
Console.WriteLine(output.ToString());
|
Console.WriteLine(output.ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
output.Append(str);
|
||||||
ConsoleInteractive.ConsoleWriter.WriteLineFormatted(output.ToString());
|
ConsoleInteractive.ConsoleWriter.WriteLineFormatted(output.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue