CLre/CLre_server/Tweaks/Chat/ChatHandler.cs

33 lines
864 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Reflection;
namespace CLre_server.Tweaks.Chat
{
public static class ChatHandler
{
private static AuthenticationEngine _chatAuthEngine = null;
private static ChatConnectionEngine _chatConnectionEngine = null;
internal static bool IsAuthenticationReady
{
get => _chatAuthEngine.IsAuthenticated;
}
internal static string PublicId
{
get => _chatAuthEngine.response.PublicId;
}
internal static string Token
{
get => _chatAuthEngine.response.Token;
}
public static void Init()
{
if (!CLre.Config.chat_commands) return;
_chatAuthEngine = new AuthenticationEngine();
_chatConnectionEngine = new ChatConnectionEngine();
}
}
}