       {:tcp, ^sock, msg} ->
         msg = String.from_char_list!(msg) |> String.strip
         case process_msg(msg) do
-          {:msg, msg} ->
-            process_hooks(msg, state, sock)
+          {:msg, sender, msg} ->
+            process_hooks({sender, msg}, state, sock)
           {:reply, reply} ->
             irc_cmd(sock, "PRIVMSG", "\##{@channel} :#{reply}")
           :pong ->

  end

  defp resolve_hook_result({:reply, to, text}, sock) do
    irc_cmd(sock, "PRIVMSG", "\##{@channel} #{to}: :#{text}")
  end

  defp resolve_hook_result({:msg, text}, sock) do

end

defmodule IssueHook do
  def run(_sender, text) do
    IO.puts "Testing text for issues: '#{text}'"
    Regex.scan(~r"(?: |^)#(\d+)(?:(?=[[:space:]])|$)|issue[[:space:]]+#?(\d+)(?:(?=[[:space:]])|$)", text)
    |> Enum.map(fn x ->
