@commands(u'link')
@example(u'.link http://example.com')
def meetinglink(bot, trigger):
 if (not ismeetingrunning(trigger.sender)):
  bot.say(u"Can't do that, start meeting first")
  return
 if (not trigger.group(2)):
  bot.say(u'try .action someone will do something')
  return
 if (not ischair(trigger.nick, trigger.sender)):
  bot.say(u'Only meeting head or chairs can do that')
  return
 link = trigger.group(2)
 if (not link.startswith(u'http')):
  link = (u'http://' + link)
 try:
  title = find_title(link, verify=bot.config.core.verify_ssl)
 except:
  title = u''
 logplain((u'LINK: %s [%s]' % (link, title)), trigger.sender)
 logHTML_listitem((u'<a href="%s">%s</a>' % (link, title)), trigger.sender)
 bot.say((u'\x02LINK\x0f: ' + link))

@ commands ( u'link' ) @ example ( u'.link http://example.com' ) def meetinglink ( bot , trigger ) : if ( not ismeetingrunning ( trigger . sender ) ) : bot . say ( u"Can't do that, start meeting first" ) return if ( not trigger . group ( 2 ) ) : bot . say ( u'try .action someone will do something' ) return if ( not ischair ( trigger . nick , trigger . sender ) ) : bot . say ( u'Only meeting head or chairs can do that' ) return link = trigger . group ( 2 ) if ( not link . startswith ( u'http' ) ) : link = ( u'http://' + link ) try : title = find_title ( link , verify = bot . config . core . verify_ssl ) except : title = u'' logplain ( ( u'LINK: %s [%s]' % ( link , title ) ) , trigger . sender ) logHTML_listitem ( ( u'<a href="%s">%s</a>' % ( link , title ) ) , trigger . sender ) bot . say ( ( u'\x02LINK\x0f: ' + link ) )
log a link in the meeing log .