Exemple #1
0
        /// <summary>
        /// 33 - "@a"
        /// </summary>
        private void SendMsg()
        {
            uint   buddyID = Request.PopWireduint();
            string sText   = Request.PopFixedString();

            // Buddy in list?
            if (mSession.GetMessenger().GetBuddy(buddyID) != null)
            {
                // Buddy online?
                GameClient buddyClient = IonEnvironment.GetHabboHotel().GetClients().GetClientOfHabbo(buddyID);
                if (buddyClient == null)
                {
                    Response.Initialize(ResponseOpcodes.InstantMessageError); // Opcode
                    Response.AppendInt32(5);                                  // Error code
                    Response.AppendUInt32(mSession.GetHabbo().ID);
                    SendResponse();
                }
                else
                {
                    ServerMessage notify = new ServerMessage(ResponseOpcodes.NewConsole);
                    notify.AppendUInt32(mSession.GetHabbo().ID);
                    notify.AppendString(sText);
                    buddyClient.GetConnection().SendMessage(notify);
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// Sends the current response ServerMessage on the stack.
 /// </summary>
 public void SendResponse()
 {
     if (Response.ID > 0)
     {
         mSession.GetConnection().SendMessage(Response);
     }
 }