Luski.Net/Luski.net/Server.Events.cs

22 lines
490 B
C#
Raw Normal View History

2023-01-01 22:50:39 -05:00
using System;
using System.Threading.Tasks;
using Luski.net.Interfaces;
2023-01-01 22:50:39 -05:00
namespace Luski.net;
public partial class Server
2023-01-01 22:50:39 -05:00
{
public event Func<IUser, IUser, Task>? UserStatusUpdate;
public event Func<Exception, Task>? OnError;
internal void Exception(Exception e)
{
if (OnError is not null) OnError.Invoke(e);
}
internal void StatusUpdate(IUser u1, IUser u2)
{
if (UserStatusUpdate is not null) UserStatusUpdate.Invoke(u1, u2);
}
}