mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
review fix
This commit is contained in:
parent
fad2475c3f
commit
abbbd2c899
@ -690,7 +690,7 @@ func (channel *Channel) applyModeToMember(client *Client, mode modes.Mode, op mo
|
||||
channel.stateMutex.Lock()
|
||||
modeset, exists := channel.members[target]
|
||||
if exists {
|
||||
if applied := modeset.SetMode(mode, op == modes.Add); applied {
|
||||
if modeset.SetMode(mode, op == modes.Add) {
|
||||
result = &modes.ModeChange{
|
||||
Op: op,
|
||||
Mode: mode,
|
||||
|
@ -34,7 +34,7 @@ func ApplyUserModeChanges(client *Client, changes modes.ModeChanges, force bool)
|
||||
continue
|
||||
}
|
||||
|
||||
if changed := client.SetMode(change.Mode, true); changed {
|
||||
if client.SetMode(change.Mode, true) {
|
||||
if change.Mode == modes.Invisible {
|
||||
client.server.stats.ChangeInvisible(1)
|
||||
} else if change.Mode == modes.Operator || change.Mode == modes.LocalOperator {
|
||||
@ -44,7 +44,7 @@ func ApplyUserModeChanges(client *Client, changes modes.ModeChanges, force bool)
|
||||
}
|
||||
|
||||
case modes.Remove:
|
||||
if changed := client.SetMode(change.Mode, false); changed {
|
||||
if client.SetMode(change.Mode, false) {
|
||||
if change.Mode == modes.Invisible {
|
||||
client.server.stats.ChangeInvisible(-1)
|
||||
} else if change.Mode == modes.Operator || change.Mode == modes.LocalOperator {
|
||||
@ -216,7 +216,7 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
|
||||
continue
|
||||
}
|
||||
|
||||
if changed := channel.flags.SetMode(change.Mode, change.Op == modes.Add); changed {
|
||||
if channel.flags.SetMode(change.Mode, change.Op == modes.Add) {
|
||||
applied = append(applied, change)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user