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

modes: Return right character on unknown mode char

This commit is contained in:
Daniel Oaks 2016-09-14 20:42:55 +10:00
parent ad8df3c9a8
commit c9a82e3f6f

View File

@ -249,7 +249,7 @@ func umodeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
if (op == Add) || (op == Remove) {
modeArg = modeArg[1:]
} else {
client.Send(nil, server.nameString, ERR_UNKNOWNMODE, client.nickString, string(modeArg[1]), "is an unknown mode character to me")
client.Send(nil, server.nameString, ERR_UNKNOWNMODE, client.nickString, string(modeArg[0]), "is an unknown mode character to me")
return false
}
@ -327,7 +327,7 @@ func cmodeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
if (op == Add) || (op == Remove) {
modeArg = modeArg[1:]
} else {
client.Send(nil, server.nameString, ERR_UNKNOWNMODE, client.nickString, string(modeArg[1]), "is an unknown mode character to me")
client.Send(nil, server.nameString, ERR_UNKNOWNMODE, client.nickString, string(modeArg[0]), "is an unknown mode character to me")
return false
}