         hookrec(rec, type: type)
       {:direct, flag}, rec ->
         hookrec(rec, direct: flag)
+      {:exclusive, flag}, rec ->
+        hookrec(rec, exclusive: flag)
     end)
     state.update_hooks(&( &1 ++ [{id, hook}] ))
   end

  @channel "exligir"
  #@channel "elixir-lang"

  defrecordp :hookrec, [type: nil, direct: false, fn: nil]
  defrecord State, hooks: []

  defp state_add_hook(state, id, f, opts) do

  end

  defp resolve_hook_result(messages, sock) when is_list(messages) do
    Enum.reduce(messages, nil, fn msg, status ->
      status || resolve_hook_result(msg, sock)
    end)
  end


