mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
finish color code support (I think)
This commit is contained in:
@ -146,12 +146,16 @@ namespace SharedLibraryCore
|
||||
}
|
||||
|
||||
str = Regex.Replace(str, @"(\^+((?![a-z]|[A-Z]).){0,1})+", "");
|
||||
string str2 = Regex.Match(str, @"(^\/+.*$)|(^.*\/+$)")
|
||||
.Value
|
||||
.Replace("/", " /");
|
||||
return str2.Length > 0 ? str2 : str;
|
||||
return str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns a "fixed" string that prevents message truncation in IW4 (and probably other Q3 clients)
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string FixIW4ForwardSlash(this string str) => Regex.Match(str, @"(^\/+.*$)|(^.*\/+$)").Value.Replace("/", " /");
|
||||
|
||||
/// <summary>
|
||||
/// Get the IW Engine color code corresponding to an admin level
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user