   addPlugin: (hostname, plugin_name, opts) ->
     hostname = helpers.getHostname hostname
 
-    if not @getHostname hostname
+    if not _.size opts 
+      opts = {}
+
+    if @getPlugin hostname, plugin_name
       false
     else
       @config[hostname].push 


  getPlugin: (hostname, plugin_name) ->
    hostname = helpers.getHostname hostname

    if not @getHostname hostname or not plugin_name
      false
    else 
      plugins = @getHostname hostname
      plugin = false
      _.each plugins, (p) ->
        if p.name is plugin_name
          plugin = p

      if not _.isObject plugin
        false
      else 
        plugin

  updatePlugin: (hostname, plugin_name, opts) ->
    console.log 'updatePlugin'
    hostname = helpers.getHostname hostname

    if not @getHostname hostname or not plugin_name

  reset: ->
    @config = {}
    @save()
    @config

  addHostname: (hostname) ->
    hostname = helpers.getHostname hostname
