소스 검색

fix #827

tags/v2.1.0-rc1
Shivaram Lingamneni 4 년 전
부모
커밋
04549e7919
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7
    0
      irc/handlers.go

+ 7
- 0
irc/handlers.go 파일 보기

@@ -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 {

Loading…
취소
저장