3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00
This commit is contained in:
Shivaram Lingamneni 2020-04-12 22:38:39 -04:00
parent ae173fa43d
commit 04549e7919

View File

@ -2229,6 +2229,13 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
return false 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 // perform the channel rename
err := server.channels.Rename(oldName, newName) err := server.channels.Rename(oldName, newName)
if err == errInvalidChannelName { if err == errInvalidChannelName {