mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
broadcast message on player leaving, like joins
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -323,8 +323,10 @@ public final class FServerManager {
|
||||
@Override
|
||||
public void channelInactive(final ChannelHandlerContext ctx) throws Exception {
|
||||
final RemoteClient client = clients.remove(ctx.channel());
|
||||
final String username = client.getUsername();
|
||||
localLobby.disconnectPlayer(client.getIndex());
|
||||
broadcast(new LogoutEvent(client.getUsername()));
|
||||
broadcast(new MessageEvent(String.format("%s left the room", username)));
|
||||
broadcast(new LogoutEvent(username));
|
||||
super.channelInactive(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user