3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-23 03:02:48 +01:00

JOIN: Fix a dumb bug. Really dumb bug.

This commit is contained in:
Daniel Oaks 2017-04-17 20:28:01 +10:00
parent 88b5dd5621
commit 9a94121281

View File

@ -279,9 +279,11 @@ func (channel *Channel) Join(client *Client, key string) {
chanReg := client.server.loadChannelNoMutex(tx, channel.nameCasefolded)
if chanReg == nil {
channel.createdTime = time.Now()
channel.members[client][ChannelOperator] = true
givenMode = &ChannelOperator
if len(channel.members) == 1 {
channel.createdTime = time.Now()
channel.members[client][ChannelOperator] = true
givenMode = &ChannelOperator
}
} else {
// we should only do this on registered channels
if client.account != nil && client.account.Name == chanReg.Founder {