30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
|
namespace MelonVPNCore
|
|||
|
{
|
|||
|
public static class Messages
|
|||
|
{
|
|||
|
public static string EOF = "<EOF>";
|
|||
|
public static string Code = "80d168e76f6bd40efe897881f35bcd895459e42a";
|
|||
|
public static string StatusMsg = "STATUS::" + Code + EOF;
|
|||
|
public static string OnlineMsg = "ONLINE::" + Code + EOF;
|
|||
|
public static string OfflineMsg = "OFFLINE::" + Code + EOF;
|
|||
|
public static string StartMsg = "START::" + Code + EOF;
|
|||
|
public static string StopMsg = "STOP::" + Code + EOF;
|
|||
|
public static string ErrorMsg = "ERROR::" + Code + EOF;
|
|||
|
public static string ClientListStartMsg = "CLIENTLIST::" + Code + "::";
|
|||
|
|
|||
|
public static string GetMessage(DataMessage a)
|
|||
|
{
|
|||
|
if (a == DataMessage.Status) return StatusMsg;
|
|||
|
if (a == DataMessage.Online) return OnlineMsg;
|
|||
|
if (a == DataMessage.Offline) return OfflineMsg;
|
|||
|
if (a == DataMessage.Start) return StartMsg;
|
|||
|
if (a == DataMessage.Stop) return StopMsg;
|
|||
|
if (a == DataMessage.Error) return ErrorMsg;
|
|||
|
if (a == DataMessage.Blank) return EOF;
|
|||
|
return EOF;
|
|||
|
}
|
|||
|
|
|||
|
public static string GetClientListMessage(string a) => ClientListStartMsg + a + EOF;
|
|||
|
}
|
|||
|
}
|