Added saving to channel removal.

This commit is contained in:
Andrew Lalis 2021-08-25 19:09:56 +02:00
parent f159708fa2
commit 66224c63d4
1 changed files with 2 additions and 0 deletions

View File

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