         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

    IO.puts "receiver: '#{receiver}', sender: '#{sender}'"

    tokens = tokenize(msg)
    Enum.each(hooks, fn
      {_, hookrec(type: type, direct: direct, fn: f)} ->
        if (not direct) || (receiver == @nickname) do
          arg = case type do
            :text  -> if direct do strip_msg_receiver(msg, receiver) else msg end
            :token -> tokens
          end
          resolve_hook_result(f.(sender, arg), sock)
        end
    end)
  end

  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


