mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
server: Check for channel permissions when renaming channels
This commit is contained in:
parent
0f8ab4eaec
commit
4128ff6137
@ -819,6 +819,12 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
//TODO(dan): allow IRCops to do this?
|
||||
if !channel.ClientIsAtLeast(client, Operator) {
|
||||
client.Send(nil, server.name, ERR_CHANOPRIVSNEEDED, client.nick, oldName, "Only chanops can rename channels")
|
||||
return false
|
||||
}
|
||||
|
||||
channel.membersMutex.Lock()
|
||||
defer channel.membersMutex.Unlock()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user