mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-14 07:59:31 +01:00
fix #827
This commit is contained in:
parent
ae173fa43d
commit
04549e7919
@ -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