mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
fixed broken broadcast events
events don't get out of order when a invalid event line throws exception handle the stats history update with no change throwing DBConcurrencyException
This commit is contained in:
@ -116,7 +116,7 @@ namespace SharedLibraryCore
|
||||
/// <param name="Message">Message to be sent to all players</param>
|
||||
public async Task Broadcast(String Message)
|
||||
{
|
||||
#if !DEBUG
|
||||
#if DEBUG == false
|
||||
string formattedMessage = String.Format(RconParser.GetCommandPrefixes().Say, Message);
|
||||
#else
|
||||
Logger.WriteVerbose(Message.StripColors());
|
||||
@ -124,8 +124,12 @@ namespace SharedLibraryCore
|
||||
var e = new GameEvent()
|
||||
{
|
||||
Type = GameEvent.EventType.Broadcast,
|
||||
#if DEBUG == true
|
||||
Data = Message,
|
||||
Owner = this
|
||||
#else
|
||||
Data = formattedMessage,
|
||||
#endif
|
||||
Owner = this,
|
||||
};
|
||||
|
||||
Manager.GetEventHandler().AddEvent(e);
|
||||
|
Reference in New Issue
Block a user