3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-01 16:39:26 +01:00

rename IncludeAllChannelAttrs

This commit is contained in:
Shivaram Lingamneni 2020-03-02 01:46:22 -05:00
parent c0192e0e52
commit 3005e95c1f
3 changed files with 5 additions and 5 deletions

View File

@ -359,7 +359,7 @@ func (channel *Channel) Transfer(client *Client, target string, hasPrivs bool) (
status = channelTransferFailed status = channelTransferFailed
defer func() { defer func() {
if status == channelTransferComplete && err == nil { if status == channelTransferComplete && err == nil {
channel.Store(IncludeAllChannelAttrs) channel.Store(IncludeAllAttrs)
} }
}() }()
@ -400,7 +400,7 @@ func (channel *Channel) transferOwnership(newOwner string) {
func (channel *Channel) AcceptTransfer(client *Client) (err error) { func (channel *Channel) AcceptTransfer(client *Client) (err error) {
defer func() { defer func() {
if err == nil { if err == nil {
channel.Store(IncludeAllChannelAttrs) channel.Store(IncludeAllAttrs)
} }
}() }()

View File

@ -198,7 +198,7 @@ func (cm *ChannelManager) SetRegistered(channelName string, account string) (err
defer func() { defer func() {
if err == nil && channel != nil { if err == nil && channel != nil {
// registration was successful: make the database reflect it // registration was successful: make the database reflect it
err = channel.Store(IncludeAllChannelAttrs) err = channel.Store(IncludeAllAttrs)
} }
}() }()
@ -272,7 +272,7 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
var info RegisteredChannel var info RegisteredChannel
defer func() { defer func() {
if channel != nil && info.Founder != "" { if channel != nil && info.Founder != "" {
channel.Store(IncludeAllChannelAttrs) channel.Store(IncludeAllAttrs)
// we just flushed the channel under its new name, therefore this delete // we just flushed the channel under its new name, therefore this delete
// cannot be overwritten by a write to the old name: // cannot be overwritten by a write to the old name:
cm.server.channelRegistry.Delete(info) cm.server.channelRegistry.Delete(info)

View File

@ -70,7 +70,7 @@ const (
// this is an OR of all possible flags // this is an OR of all possible flags
const ( const (
IncludeAllChannelAttrs = ^uint(0) IncludeAllAttrs = ^uint(0)
) )
// RegisteredChannel holds details about a given registered channel. // RegisteredChannel holds details about a given registered channel.