From 66224c63d48e9506a82f3fd2c08765a4c4c1d6a6 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Wed, 25 Aug 2021 19:09:56 +0200 Subject: [PATCH] Added saving to channel removal. --- .../concord_server/cli/command/RemoveChannelCommand.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main/java/nl/andrewl/concord_server/cli/command/RemoveChannelCommand.java b/server/src/main/java/nl/andrewl/concord_server/cli/command/RemoveChannelCommand.java index ef90733..19e0fb9 100644 --- a/server/src/main/java/nl/andrewl/concord_server/cli/command/RemoveChannelCommand.java +++ b/server/src/main/java/nl/andrewl/concord_server/cli/command/RemoveChannelCommand.java @@ -36,6 +36,8 @@ public class RemoveChannelCommand implements ServerCliCommand { } server.getChannelManager().removeChannel(channelToRemove); server.getDb().getContext().dropCollection(channelToRemove.getMessageCollection().getName()); + server.getConfig().getChannels().removeIf(channelConfig -> channelConfig.getName().equals(channelToRemove.getName())); + server.getConfig().save(); server.broadcast(server.getMetaData()); } }