@sopel.module.event(events.ERR_NOCHANMODES)
@sopel.module.rule(u'.*')
@sopel.module.priority(u'high')
def retry_join(bot, trigger):
 channel = trigger.args[1]
 if (channel in bot.memory[u'retry_join'].keys()):
  bot.memory[u'retry_join'][channel] += 1
  if (bot.memory[u'retry_join'][channel] > 10):
   LOGGER.warning(u'Failed to join %s after 10 attempts.', channel)
   return
 else:
  bot.memory[u'retry_join'][channel] = 0
  bot.join(channel)
  return
 time.sleep(6)
 bot.join(channel)

@ sopel . module . event ( events . ERR_NOCHANMODES ) @ sopel . module . rule ( u'.*' ) @ sopel . module . priority ( u'high' ) def retry_join ( bot , trigger ) : channel = trigger . args [ 1 ] if ( channel in bot . memory [ u'retry_join' ] . keys ( ) ) : bot . memory [ u'retry_join' ] [ channel ] += 1 if ( bot . memory [ u'retry_join' ] [ channel ] > 10 ) : LOGGER . warning ( u'Failed to join %s after 10 attempts.' , channel ) return else : bot . memory [ u'retry_join' ] [ channel ] = 0 bot . join ( channel ) return time . sleep ( 6 ) bot . join ( channel )
give nickserver enough time to identify on a +r channel .