mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
channel: Don't send TOPIC on entirely new channel
This commit is contained in:
parent
2759d8f5d3
commit
79de443496
@ -272,6 +272,7 @@ func (channel *Channel) Join(client *Client, key string) {
|
||||
channel.members.Add(client)
|
||||
|
||||
// give channel mode if necessary
|
||||
var newChannel bool
|
||||
var givenMode *Mode
|
||||
client.server.registeredChannelsMutex.Lock()
|
||||
defer client.server.registeredChannelsMutex.Unlock()
|
||||
@ -283,6 +284,7 @@ func (channel *Channel) Join(client *Client, key string) {
|
||||
channel.createdTime = time.Now()
|
||||
channel.members[client][ChannelOperator] = true
|
||||
givenMode = &ChannelOperator
|
||||
newChannel = true
|
||||
}
|
||||
} else {
|
||||
// we should only do this on registered channels
|
||||
@ -316,7 +318,10 @@ func (channel *Channel) Join(client *Client, key string) {
|
||||
} else {
|
||||
client.Send(nil, client.nickMaskString, "JOIN", channel.name)
|
||||
}
|
||||
channel.getTopicNoMutex(client) // we already have Lock
|
||||
// don't sent topic when it's an entirely new channel
|
||||
if !newChannel {
|
||||
channel.getTopicNoMutex(client) // we already have Lock
|
||||
}
|
||||
channel.namesNoMutex(client)
|
||||
if givenMode != nil {
|
||||
for member := range channel.members {
|
||||
|
Loading…
Reference in New Issue
Block a user