IRC operators can use /MODE to do anything they like

This commit is contained in:
Harry Jeffery 2013-08-29 21:12:17 +01:00
parent d8f874caef
commit 72a60aa55f

View File

@ -396,10 +396,14 @@ func (s *Server) handleEvent(e Event) {
} }
if cm, ok := channel.modeMap[strings.ToLower(e.client.nick)]; !ok || !cm.operator { if cm, ok := channel.modeMap[strings.ToLower(e.client.nick)]; !ok || !cm.operator {
//Not an operator //Not a channel operator.
//If they're not an irc operator either, they'll fail
if !e.client.operator {
e.client.reply(errNoPriv) e.client.reply(errNoPriv)
return return
} }
}
hasClient := false hasClient := false
var oldClientMode, newClientMode *ClientMode var oldClientMode, newClientMode *ClientMode