1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

implement RSS feed in auto messages for issue #53

modified automessages to use async mesthods instead of synchronous
This commit is contained in:
RaidMax
2019-02-18 19:30:38 -06:00
parent ea40f17f7b
commit cd49a9843e
10 changed files with 1574 additions and 29 deletions

View File

@ -183,7 +183,7 @@ namespace SharedLibraryCore
return CurrentLocalization.LocalizationIndex[$"GLOBAL_PERMISSION_{perm.ToString().ToUpper()}"];
}
public static String ProcessMessageToken(this Server server, IList<Helpers.MessageToken> tokens, String str)
public async static Task<string> ProcessMessageToken(this Server server, IList<Helpers.MessageToken> tokens, String str)
{
MatchCollection RegexMatches = Regex.Matches(str, @"\{\{[A-Z]+\}\}", RegexOptions.IgnoreCase);
foreach (Match M in RegexMatches)
@ -195,7 +195,7 @@ namespace SharedLibraryCore
if (found != null)
{
str = str.Replace(Match, found.Process(server));
str = str.Replace(Match, (await found.ProcessAsync(server)).ToString());
}
}