2023-01-01 22:50:39 -05:00
|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
2023-07-03 23:24:35 -04:00
|
|
|
using Luski.net.Interfaces;
|
2023-01-01 22:50:39 -05:00
|
|
|
|
|
|
|
namespace Luski.net;
|
|
|
|
|
2023-07-08 09:06:13 -04:00
|
|
|
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;
|
2023-07-08 09:06:13 -04:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2023-07-03 23:24:35 -04:00
|
|
|
}
|