From 04549e79191a675c7fce0aa2369657ce9b06532b Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 12 Apr 2020 22:38:39 -0400 Subject: [PATCH] fix #827 --- irc/handlers.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/irc/handlers.go b/irc/handlers.go index 5df1bb69..31d4eae6 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -2229,6 +2229,13 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re return false } + config := server.Config() + status, _ := channel.historyStatus(config) + if status == HistoryPersistent { + rb.Add(nil, server.name, ERR_CANNOTRENAME, client.Nick(), oldName, newName, client.t("Channels with persistent history cannot be renamed")) + return false + } + // perform the channel rename err := server.channels.Rename(oldName, newName) if err == errInvalidChannelName {