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 {
|
for _, worker := range b.worker {
|
||||||
if _, ok := worker.joinedChannels[channel]; ok {
|
if _, ok := worker.joinedChannels[channel]; ok {
|
||||||
// already joined but join again in case it was a temporary ban
|
// already joined but join again in case it was a temporary ban
|
||||||
b.Join(channel)
|
worker.client.Join(channel)
|
||||||
return
|
joined = true
|
||||||
}
|
} else if len(worker.joinedChannels) < 50 {
|
||||||
|
|
||||||
if len(worker.joinedChannels) < 50 {
|
|
||||||
log.Info("[bot] joining " + channel)
|
log.Info("[bot] joining " + channel)
|
||||||
worker.client.Join(channel)
|
worker.client.Join(channel)
|
||||||
worker.joinedChannels[channel] = true
|
worker.joinedChannels[channel] = true
|
||||||
|
|
Loading…
Add table
Reference in a new issue