   runCommand: (command, message) ->
     d = domain.create()
     d.on 'error', (err) =>
-      @emit 'error', "[runCommand] " + err.toString()
+      @emit 'error', "[#{@config.commandPrefix}#{command}] " + err.toString()
     d.run =>
       cmd = @commands[command]
       if typeof cmd is 'function' then cmd message

    @runCommand command, message

  _handleEvent: (eventType, message) ->
    d = domain.create()
    d.on 'error', (err) =>
      @emit 'error', "[_handleEvent] " + err.toString()
    d.run =>
      for name, plugin of @plugins
        if plugin.events? and plugin.events.hasOwnProperty eventType
          plugin.events[eventType] message


  say: (context, message) =>
    @client.say context, message

  action: (context, message) =>
    @client.action context, message

  # Regular "public methods":

  load: (name, plugin) ->
    if typeof plugin is 'function'
      botProxy = {}
      botProxy[f] = @[f] for f in ['meet', 'forget', 'say', 'action']
      botProxy.config = {}
      botProxy.config[key] = val for key, val of @config when typeof val is 'string'
      plugin = plugin botProxy
