mirror of
https://github.com/ergochat/ergo.git
synced 2025-10-11 04:57:26 +02:00
Merge pull request #1825 from slingamn/samode_f
SAMODE +f shouldn't require channel privileges
This commit is contained in:
commit
3d4170ef98
@ -267,12 +267,12 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
|
|||||||
} else if ch == channel {
|
} else if ch == channel {
|
||||||
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), fmt.Sprintf(client.t("You can't forward a channel to itself")))
|
rb.Add(nil, client.server.name, ERR_INVALIDMODEPARAM, details.nick, chname, string(change.Mode), utils.SafeErrorParam(change.Arg), fmt.Sprintf(client.t("You can't forward a channel to itself")))
|
||||||
} else {
|
} else {
|
||||||
if !ch.ClientIsAtLeast(client, modes.ChannelOperator) {
|
if isSamode || ch.ClientIsAtLeast(client, modes.ChannelOperator) {
|
||||||
rb.Add(nil, client.server.name, ERR_CHANOPRIVSNEEDED, details.nick, ch.Name(), client.t("You must be a channel operator in the channel you are forwarding to"))
|
|
||||||
} else {
|
|
||||||
change.Arg = ch.Name()
|
change.Arg = ch.Name()
|
||||||
channel.setForward(change.Arg)
|
channel.setForward(change.Arg)
|
||||||
applied = append(applied, change)
|
applied = append(applied, change)
|
||||||
|
} else {
|
||||||
|
rb.Add(nil, client.server.name, ERR_CHANOPRIVSNEEDED, details.nick, ch.Name(), client.t("You must be a channel operator in the channel you are forwarding to"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case modes.Remove:
|
case modes.Remove:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user