From 45805fbe380b4cecd909946c3ef1395eacb8d8b1 Mon Sep 17 00:00:00 2001 From: Jgunishka <53265225+Jgunishka@users.noreply.github.com> Date: Wed, 21 Aug 2019 21:23:59 +0300 Subject: [PATCH] Add kick errors notifications --- .../controller/v086/action/GameKickAction.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/org/emulinker/kaillera/controller/v086/action/GameKickAction.java b/src/org/emulinker/kaillera/controller/v086/action/GameKickAction.java index 90fcb4a..6de97de 100644 --- a/src/org/emulinker/kaillera/controller/v086/action/GameKickAction.java +++ b/src/org/emulinker/kaillera/controller/v086/action/GameKickAction.java @@ -1,6 +1,7 @@ package org.emulinker.kaillera.controller.v086.action; import org.apache.commons.logging.*; +import org.emulinker.kaillera.controller.messaging.MessageFormatException; import org.emulinker.kaillera.controller.v086.V086Controller; import org.emulinker.kaillera.controller.v086.protocol.*; import org.emulinker.kaillera.model.exception.GameKickException; @@ -46,6 +47,15 @@ public class GameKickAction implements V086Action catch (GameKickException e) { log.debug("Failed to kick: " + e.getMessage()); + //new SF MOD - kick errors notifications + try + { + clientHandler.send(new GameChat_Notification(clientHandler.getNextMessageNumber(), "Error", e.getMessage())); + } + catch (MessageFormatException ex) + { + log.error("Failed to contruct GameChat_Notification message: " + e.getMessage(), e); + } } } }