def check_callbacks(bot, trigger, url, run=True):
 matched = any((regex.search(url) for regex in bot.memory[u'url_exclude']))
 for (regex, function) in tools.iteritems(bot.memory[u'url_callbacks']):
  match = regex.search(url)
  if match:
   if (run or hasattr(function, u'url_regex')):
    function(bot, trigger, match)
   matched = True
 return matched

def check_callbacks ( bot , trigger , url , run = True ) : matched = any ( ( regex . search ( url ) for regex in bot . memory [ u'url_exclude' ] ) ) for ( regex , function ) in tools . iteritems ( bot . memory [ u'url_callbacks' ] ) : match = regex . search ( url ) if match : if ( run or hasattr ( function , u'url_regex' ) ) : function ( bot , trigger , match ) matched = True return matched
check the given url against the callbacks list .