예제 #1
0
        public void Update(IdentificationFailedBannedMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            BanEndDate = msg.banEndDate.UnixTimestampToDateTime();
            Banned     = true;

            logger.Warn("F*** I'm banned :( for {0}", BanEndDate - DateTime.Now);
        }
예제 #2
0
        public static void IdentificationFailedBannedMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            IdentificationFailedBannedMessage msg = (IdentificationFailedBannedMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.Log(new ConnectionTextInformation("Echec de connexion : Vous êtes bannis."), 0);
            account.SocketManager.DisconnectFromGUI();
        }
예제 #3
0
 private void IdentificationFailedBannedMessageHandler(DofusClient Client, IdentificationFailedBannedMessage Message)
 {
     if (Message.BanEndDate != 0)
     {
         Client.Logger.Log($"Votre compte est banni jusqu'au : {Message.BanEndDate.UnixTimestampToDateTime()}.", LogMessageType.Public);
     }
     else
     {
         Client.Logger.Log("Votre compte est banni pour : " + Message.Reason, LogMessageType.Public);
     }
     Client.Dispose();
 }
예제 #4
0
 private void HandleIdentificationFailedBannedMessage(IAccount account,
                                                      IdentificationFailedBannedMessage message)
 {
     if (message.BanEndDate != 0)
     {
         Logger.Default.Log($"Votre compte est banni jusqu'au : {message.BanEndDate.UnixTimestampToDateTime()}.",
                            LogMessageType.Public);
     }
     else
     {
         Logger.Default.Log("Votre compte est banni pour : " + message.Reason, LogMessageType.Public);
     }
 }
예제 #5
0
 private void HandleIdentificationBannedMessage(IdentificationFailedBannedMessage msg)
 {
     Console.WriteLine("Banned !");
 }
 public static void HandleIdentificationFailedBannedMessage(Bot bot, IdentificationFailedBannedMessage message)
 {
     bot.ClientInformations.Update(message);
     bot.OnCharacterIdentified(false);
 }
예제 #7
0
 public static Task HandleIdentificationFailedBannedMessage(Account account, IdentificationFailedBannedMessage message)
 => Task.Run(() =>
 {
     DateTime until = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddMilliseconds(message.BanEndDate);
     account.Logger.LogError("IdentificationFrame", $"{(IdentificationFailureReasonEnum)message.Reason} [{until.ToShortDateString()} {until.ToShortTimeString()}]");
 });