mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
moved event API stuff around
finally fixed threading issue (which actually had to do with IW4x log outputs being out of sync (not an issue with my code). What a lot of headache over something that wasn't my fault.
This commit is contained in:
@ -118,25 +118,17 @@ namespace SharedLibraryCore
|
||||
{
|
||||
#if !DEBUG
|
||||
string formattedMessage = String.Format(RconParser.GetCommandPrefixes().Say, Message);
|
||||
|
||||
var e = new GameEvent()
|
||||
{
|
||||
Message = formattedMessage,
|
||||
Data = formattedMessage,
|
||||
Owner = this,
|
||||
Type = GameEvent.EventType.Broadcast,
|
||||
};
|
||||
|
||||
Manager.GetEventHandler().AddEvent(e);
|
||||
#else
|
||||
Logger.WriteVerbose(Message.StripColors());
|
||||
#endif
|
||||
Manager.GetEventHandler().AddEvent(new GameEvent()
|
||||
var e = new GameEvent()
|
||||
{
|
||||
Type = GameEvent.EventType.Broadcast,
|
||||
Data = Message,
|
||||
Owner = this
|
||||
});
|
||||
};
|
||||
|
||||
Manager.GetEventHandler().AddEvent(e);
|
||||
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
Reference in New Issue
Block a user