|
@@ -1513,7 +1513,8 @@ func (channel *Channel) Invite(invitee *Client, inviter *Client, rb *ResponseBuf
|
1513
|
1513
|
}
|
1514
|
1514
|
|
1515
|
1515
|
inviteOnly := channel.flags.HasMode(modes.InviteOnly)
|
1516
|
|
- if inviteOnly && !channel.ClientIsAtLeast(inviter, modes.ChannelOperator) {
|
|
1516
|
+ hasPrivs := channel.ClientIsAtLeast(inviter, modes.ChannelOperator)
|
|
1517
|
+ if inviteOnly && !hasPrivs {
|
1517
|
1518
|
rb.Add(nil, inviter.server.name, ERR_CHANOPRIVSNEEDED, inviter.Nick(), chname, inviter.t("You're not a channel operator"))
|
1518
|
1519
|
return
|
1519
|
1520
|
}
|
|
@@ -1523,7 +1524,10 @@ func (channel *Channel) Invite(invitee *Client, inviter *Client, rb *ResponseBuf
|
1523
|
1524
|
return
|
1524
|
1525
|
}
|
1525
|
1526
|
|
1526
|
|
- if inviteOnly {
|
|
1527
|
+ // #1876: INVITE should override all join restrictions, including +b and +l,
|
|
1528
|
+ // not just +i. so we need to record it on a per-client basis iff the inviter
|
|
1529
|
+ // is privileged:
|
|
1530
|
+ if hasPrivs {
|
1527
|
1531
|
invitee.Invite(chcfname, createdAt)
|
1528
|
1532
|
}
|
1529
|
1533
|
|