Exemplo n.º 1
0
		/// <summary>
		/// Broadcasts chat message in session.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="contactId"></param>
		/// <param name="message"></param>
		public static void ChatR(ChatSession session, int contactId, string message)
		{
			var packet = new Packet(Op.Msgr.ChatR, 0);

			packet.PutLong(session.Id);
			packet.PutInt(contactId);
			packet.PutString(message);

			session.Broadcast(packet);
		}
Exemplo n.º 2
0
		/// <summary>
		/// Notifies session user about user closing chat window.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="user"></param>
		public static void ChatLeave(ChatSession session, User user)
		{
			var packet = new Packet(Op.Msgr.ChatLeave, 0);

			packet.PutLong(session.Id);
			packet.PutInt(user.Id);

			session.Broadcast(packet);
		}
Exemplo n.º 3
0
		/// <summary>
		/// Notifies users about someone joining the chat.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="user"></param>
		public static void ChatInviteR(ChatSession session, User user)
		{
			var packet = new Packet(Op.Msgr.ChatInviteR, 0);

			packet.PutLong(session.Id);
			packet.PutInt(user.Id);
			packet.PutString(user.FullName);
			packet.PutString(user.Nickname);

			session.Broadcast(packet);
		}