mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-23 04:19:25 +01:00
commit
f07a456688
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user