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()); } }