|
@@ -2229,6 +2229,13 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
|
2229
|
2229
|
return false
|
2230
|
2230
|
}
|
2231
|
2231
|
|
|
2232
|
+ config := server.Config()
|
|
2233
|
+ status, _ := channel.historyStatus(config)
|
|
2234
|
+ if status == HistoryPersistent {
|
|
2235
|
+ rb.Add(nil, server.name, ERR_CANNOTRENAME, client.Nick(), oldName, newName, client.t("Channels with persistent history cannot be renamed"))
|
|
2236
|
+ return false
|
|
2237
|
+ }
|
|
2238
|
+
|
2232
|
2239
|
// perform the channel rename
|
2233
|
2240
|
err := server.channels.Rename(oldName, newName)
|
2234
|
2241
|
if err == errInvalidChannelName {
|