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

update application version

ignore stat events of bots if they are ignored
limit max number of bot profiles to 18, greater than 18 wraps
prevent anti cheat from running on bot events
create localization folder on publish so copying over doesn't fail
include quick message mapping on webfront server history chat
make gravatar on profile not repeat
This commit is contained in:
RaidMax
2019-04-25 13:00:54 -05:00
parent 3488bc5d15
commit 01c94dad79
10 changed files with 78 additions and 71 deletions

View File

@ -189,6 +189,10 @@ namespace IW4MAdmin
if (E.Type == GameEvent.EventType.ConnectionRestored)
{
if (Throttled)
{
Logger.WriteVerbose(loc["MANAGER_CONNECTION_REST"].FormatExt($"[{IP}:{Port}]"));
}
Logger.WriteInfo("Connection restored to server, so we are no longer throttling the poll rate");
Throttled = false;
}
@ -390,18 +394,27 @@ namespace IW4MAdmin
{
E.Data = E.Data.StripColors();
if (E.Data.Length > 0)
if (E.Data?.Length > 0)
{
// this may be a fix for a hard to reproduce null exception error
lock (ChatHistory)
string message = E.Data;
if (E.Data.IsQuickMessage())
{
ChatHistory.Add(new ChatInfo()
try
{
Name = E.Origin.Name,
Message = E.Data ?? "NULL",
Time = DateTime.UtcNow
});
message = Manager.GetApplicationSettings().Configuration()
.QuickMessages
.First(_qm => _qm.Game == GameName)
.Messages[E.Data.Substring(1)];
}
catch { }
}
ChatHistory.Add(new ChatInfo()
{
Name = E.Origin.Name,
Message = message,
Time = DateTime.UtcNow
});
}
}
@ -649,8 +662,6 @@ namespace IW4MAdmin
if (ConnectionErrors > 0)
{
Logger.WriteVerbose(loc["MANAGER_CONNECTION_REST"].FormatExt($"[{IP}:{Port}]"));
var _event = new GameEvent()
{
Type = GameEvent.EventType.ConnectionRestored,
@ -921,7 +932,7 @@ namespace IW4MAdmin
#if !DEBUG
else
{
string formattedKick = String.Format(RconParser.Configuration.CommandPrefixes.Kick, Target.ClientNumber, $"{loc["SERVER_KICK_TEXT"]} - ^5{Reason}^7");
string formattedKick = string.Format(RconParser.Configuration.CommandPrefixes.Kick, Target.ClientNumber, $"{loc["SERVER_KICK_TEXT"]} - ^5{Reason}^7");
await Target.CurrentServer.ExecuteCommandAsync(formattedKick);
}
#endif