code: def runPlugins(self, category, func, protocol, *args):
          
          # Plugins are already sorted by priority
          for plugin in self.plugins:
              # If a plugin throws an exception, we should catch it gracefully.
              try:
                  event_listener = getattr(plugin, func)
              except AttributeError:
                  # If the plugin doesn't implement the event, do nothing
                  pass
              else:
                  try:
                      stop = event_listener(protocol, *args)
                      if stop:
                          break
                  except Exception:
                      # A plugin should not be able to crash the bot.
                      # Catch and log all errors.
                      traceback.print_exc()
docs: Run the specified set of plugins against a given protocol.