Merge pull request #1434 from slingamn/need_privs

change FAIL codes from NOT_PRIVED to PRIVS_NEEDED
This commit is contained in:
Shivaram Lingamneni
2020-12-06 23:28:04 -08:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1571,7 +1571,7 @@ func (channel *Channel) Uninvite(invitee *Client, inviter *Client, rb *ResponseB
}
if !channel.ClientIsAtLeast(inviter, modes.ChannelOperator) {
rb.Add(nil, channel.server.name, "FAIL", "UNINVITE", "NOT_PRIVED", channel.Name(), inviter.t("You're not a channel operator"))
rb.Add(nil, channel.server.name, "FAIL", "UNINVITE", "PRIVS_NEEDED", channel.Name(), inviter.t("You're not a channel operator"))
return
}
+1 -1
View File
@@ -2548,7 +2548,7 @@ func relaymsgHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *
allowedToRelay := client.HasRoleCapabs("relaymsg") || (config.Server.Relaymsg.AvailableToChanops && channel.ClientIsAtLeast(client, modes.ChannelOperator))
if !allowedToRelay {
rb.Add(nil, server.name, "FAIL", "RELAYMSG", "NOT_PRIVED", client.t("You cannot relay messages to this channel"))
rb.Add(nil, server.name, "FAIL", "RELAYMSG", "PRIVS_NEEDED", client.t("You cannot relay messages to this channel"))
return false
}
+1 -1
Submodule irctest updated: 8c66157a9e...5aeb297de5