@sopel.module.event(u'KICK')
@sopel.module.rule(u'.*')
@sopel.module.priority(u'low')
def hold_ground(bot, trigger):
 if bot.config.admin.hold_ground:
  channel = trigger.sender
  if (trigger.args[1] == bot.nick):
   bot.join(channel)

@ sopel . module . event ( u'KICK' ) @ sopel . module . rule ( u'.*' ) @ sopel . module . priority ( u'low' ) def hold_ground ( bot , trigger ) : if bot . config . admin . hold_ground : channel = trigger . sender if ( trigger . args [ 1 ] == bot . nick ) : bot . join ( channel )
this function monitors all kicks across all channels sopel is in .