fix bad join #183
This commit is contained in:
parent
2998fbd28a
commit
8134c65b13
1 changed files with 3 additions and 5 deletions
|
@ -106,11 +106,9 @@ func (b *Bot) Join(channelNames ...string) {
|
|||
for _, worker := range b.worker {
|
||||
if _, ok := worker.joinedChannels[channel]; ok {
|
||||
// already joined but join again in case it was a temporary ban
|
||||
b.Join(channel)
|
||||
return
|
||||
}
|
||||
|
||||
if len(worker.joinedChannels) < 50 {
|
||||
worker.client.Join(channel)
|
||||
joined = true
|
||||
} else if len(worker.joinedChannels) < 50 {
|
||||
log.Info("[bot] joining " + channel)
|
||||
worker.client.Join(channel)
|
||||
worker.joinedChannels[channel] = true
|
||||
|
|
Loading…
Add table
Reference in a new issue