1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

support UTF8 in log files

sayteam registered as say event
updated readme
This commit is contained in:
RaidMax
2018-04-19 17:52:48 -05:00
parent 8e9d8e46c7
commit 75439e8c2a
11 changed files with 190 additions and 612 deletions

View File

@ -39,7 +39,7 @@ namespace SharedLibraryCore
if (fileName != string.Empty)
{
Name = fileName;
Handle = new StreamReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 4096, true), Encoding.UTF7);
Handle = new StreamReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 4096, true), Encoding.UTF8);
sze = Handle.BaseStream.Length;
}

View File

@ -267,6 +267,11 @@ namespace SharedLibraryCore
return Game.UKN;
}
public static string EscapeMarkdown(this string markdownString)
{
return markdownString.Replace("<", "\\<").Replace(">", "\\>").Replace("|", "\\|");
}
public static TimeSpan ParseTimespan(this string input)
{
var expressionMatch = Regex.Match(input, @"[0-9]+.\b");