3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-23 11:12:44 +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) chanReg := client.server.loadChannelNoMutex(tx, channel.nameCasefolded)
if chanReg == nil { if chanReg == nil {
if len(channel.members) == 1 {
channel.createdTime = time.Now() channel.createdTime = time.Now()
channel.members[client][ChannelOperator] = true channel.members[client][ChannelOperator] = true
givenMode = &ChannelOperator givenMode = &ChannelOperator
}
} else { } else {
// we should only do this on registered channels // we should only do this on registered channels
if client.account != nil && client.account.Name == chanReg.Founder { if client.account != nil && client.account.Name == chanReg.Founder {