defmodule LSG.IRC.Handler do defmacro __using__(_) do quote do alias LSG.IRC alias LSG.IRC.UserTrack alias ExIRC.Client require LSG.IRC.Handler import LSG.IRC.Handler end end def privmsg(client, {nil, %ExIRC.SenderInfo{nick: nick}}, message) do privmsg(client, nick, message) end def privmsg(client, {channel, _}, message) do privmsg(client, channel, message) end def privmsg(client, target, message) when is_binary(target) do ExIRC.Client.msg(client, :privmsg, target, message) end end