@sopel.module.require_privmsg
@sopel.module.require_admin
@sopel.module.commands(u'me')
@sopel.module.priority(u'low')
def me(bot, trigger):
 if (trigger.group(2) is None):
  return
 (channel, _sep, action) = trigger.group(2).partition(u' ')
 action = action.strip()
 if ((not channel) or (not action)):
  return
 msg = (u'\x01ACTION %s\x01' % action)
 bot.msg(channel, msg)

@ sopel . module . require_privmsg @ sopel . module . require_admin @ sopel . module . commands ( u'me' ) @ sopel . module . priority ( u'low' ) def me ( bot , trigger ) : if ( trigger . group ( 2 ) is None ) : return ( channel , _sep , action ) = trigger . group ( 2 ) . partition ( u' ' ) action = action . strip ( ) if ( ( not channel ) or ( not action ) ) : return msg = ( u'\x01ACTION %s\x01' % action ) bot . msg ( channel , msg )
send an action to a given channel or nick .