1
0
Fork 0
forked from External/ergo

Merge pull request #446 from slingamn/chanregrefactor.6

refactor channel registration
This commit is contained in:
Daniel Oaks 2019-04-04 21:59:25 +10:00 committed by GitHub
commit 8c7027c604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 425 additions and 227 deletions

View file

@ -290,14 +290,14 @@ func (channel *Channel) ProcessAccountToUmodeChange(client *Client, change modes
case modes.Add:
if targetModeNow != targetModeAfter {
channel.accountToUMode[change.Arg] = change.Mode
go client.server.channelRegistry.StoreChannel(channel, IncludeLists)
channel.MarkDirty(IncludeLists)
return []modes.ModeChange{change}, nil
}
return nil, nil
case modes.Remove:
if targetModeNow == change.Mode {
delete(channel.accountToUMode, change.Arg)
go client.server.channelRegistry.StoreChannel(channel, IncludeLists)
channel.MarkDirty(IncludeLists)
return []modes.ModeChange{change}, nil
}
return nil, nil