Exemple #1
0
        public static bool SendMessage(int id, string message)
        {
            int Unicode_Message_Len = use.GetUnicodeCharsCount(message);

            BufferClass.Buffer SendBuff = new BufferClass.Buffer(Unicode_Message_Len + 9);
            SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_SendMessage);
            SendBuff.WriteInt((uint)id);
            SendBuff.WriteInt((uint)Unicode_Message_Len);
            SendBuff.WriteUnicodeString(message);
            SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
            return(true);
        }
Exemple #2
0
 public static void SendRequestAway(int ID)
 {
     BufferClass.Buffer SendBuff = new BufferClass.Buffer(5);
     SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_RequestAway);
     SendBuff.WriteInt((uint)ID);
     SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
 }
Exemple #3
0
 public static void SendContactRequest(int ID)
 {
     BufferClass.Buffer SendBuff = new BufferClass.Buffer(6);
     SendBuff.WriteByte((byte)Packets.S_SUBPROTO_CONTACTLIST.CONTACTLIST_RequestContact);
     SendBuff.WriteInt((uint)ID);
     SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_CONTACTLIST, SendBuff.GetWrittenBuffer());
 }
Exemple #4
0
 public static void SendTyping(int id, bool State)
 {
     BufferClass.Buffer SendBuff = new BufferClass.Buffer(5);
     SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_TypingUser);
     SendBuff.WriteByte(Convert.ToByte(State));
     SendBuff.WriteInt((uint)id);
     SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
 }
Exemple #5
0
        public static void SendChangeAway(string message)
        {
            int Unicode_Message_Len = use.GetUnicodeCharsCount(message);

            BufferClass.Buffer SendBuff = new BufferClass.Buffer(Unicode_Message_Len + 5);
            SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_ChangeAway);
            SendBuff.WriteInt((uint)Unicode_Message_Len);
            SendBuff.WriteUnicodeString(message);
            SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
        }