Unofficial CardLife revival project, pronounced like "celery"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChatHandler.cs 864B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. using System.Reflection;
  3. namespace CLre_server.Tweaks.Chat
  4. {
  5. public static class ChatHandler
  6. {
  7. private static AuthenticationEngine _chatAuthEngine = null;
  8. private static ChatConnectionEngine _chatConnectionEngine = null;
  9. internal static bool IsAuthenticationReady
  10. {
  11. get => _chatAuthEngine.IsAuthenticated;
  12. }
  13. internal static string PublicId
  14. {
  15. get => _chatAuthEngine.response.PublicId;
  16. }
  17. internal static string Token
  18. {
  19. get => _chatAuthEngine.response.Token;
  20. }
  21. public static void Init()
  22. {
  23. if (!CLre.Config.chat_commands) return;
  24. _chatAuthEngine = new AuthenticationEngine();
  25. _chatConnectionEngine = new ChatConnectionEngine();
  26. }
  27. }
  28. }