mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix channel mode change privilege enforcement
This commit is contained in:
parent
d5832bf765
commit
6d619bf411
@ -488,7 +488,7 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
|
|||||||
for _, change := range changes {
|
for _, change := range changes {
|
||||||
// chan priv modes are checked specially so ignore them
|
// chan priv modes are checked specially so ignore them
|
||||||
// means regular users can't view ban/except lists... but I'm not worried about that
|
// means regular users can't view ban/except lists... but I'm not worried about that
|
||||||
if isSamode && ChannelModePrefixes[change.mode] == "" && !clientIsOp {
|
if !isSamode && ChannelModePrefixes[change.mode] == "" && !clientIsOp {
|
||||||
if !alreadySentPrivError {
|
if !alreadySentPrivError {
|
||||||
alreadySentPrivError = true
|
alreadySentPrivError = true
|
||||||
client.Send(nil, client.server.name, ERR_CHANOPRIVSNEEDED, channel.name, "You're not a channel operator")
|
client.Send(nil, client.server.name, ERR_CHANOPRIVSNEEDED, channel.name, "You're not a channel operator")
|
||||||
|
Loading…
Reference in New Issue
Block a user