3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 11:59:40 +01:00

OPER: If client's already opered-up, ignore new OPER attempts

This commit is contained in:
Daniel Oaks 2017-07-23 22:50:50 +10:00
parent cc15ec9d2d
commit b807f492ed

View File

@ -1370,6 +1370,10 @@ func operHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
client.Send(nil, server.name, ERR_PASSWDMISMATCH, client.nick, "Password incorrect")
return true
}
if client.flags[Operator] == true {
client.Send(nil, server.name, ERR_UNKNOWNERROR, "OPER", "You're already opered-up!")
return false
}
hash := server.operators[name].Pass
password := []byte(msg.Params[1])