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); }
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(); }
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(); }
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); } }
private void HandleIdentificationBannedMessage(IdentificationFailedBannedMessage msg) { Console.WriteLine("Banned !"); }
public static void HandleIdentificationFailedBannedMessage(Bot bot, IdentificationFailedBannedMessage message) { bot.ClientInformations.Update(message); bot.OnCharacterIdentified(false); }
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()}]"); });