     Process.register(pid, __MODULE__)
   end
 
-  def add_hook(id, hook, opts \\ []) do
-    Process.send(__MODULE__, {:internal, {:add_hook, id, hook, opts}})
+  def add_hook(id, f, opts \\ []) do
+    Process.send(__MODULE__, {:internal, {:add_hook, id, f, opts}})
   end
 
   def remove_hook(id) do



  defp irc_cmd(sock, cmd, rest) do
    IO.puts "Executing command #{cmd}"
    :ok = :gen_tcp.send(sock, "#{cmd} #{rest}\r\n")
    sock
  end

end

defmodule TriviaHook do
  def run(_sender, text) do
    tokens = tokenize(text)
    result = if find_at_least(tokens, [{["mix", "project", "application", "app"], 1}, {["shell", "iex", "repl"], 1}]) do
      "To start an interactive shell with your mix project loaded in it, run `iex -S mix`"
