3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-13 07:29:30 +01:00

Merge pull request #162 from slingamn/modeperms

fix channel mode change privilege enforcement
This commit is contained in:
Daniel Oaks 2017-11-09 14:56:53 +10:00 committed by GitHub
commit 44538c3b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -488,7 +488,7 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
for _, change := range changes {
// 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
if isSamode && ChannelModePrefixes[change.mode] == "" && !clientIsOp {
if !isSamode && ChannelModePrefixes[change.mode] == "" && !clientIsOp {
if !alreadySentPrivError {
alreadySentPrivError = true
client.Send(nil, client.server.name, ERR_CHANOPRIVSNEEDED, channel.name, "You're not a channel operator")