summaryrefslogtreecommitdiff
path: root/lib/irc/client/command.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-01-11 15:53:02 +0100
committerhref <href@random.sh>2021-01-11 15:53:02 +0100
commit0f3f0e035b43eabd3f739c41964446962cf54208 (patch)
tree9279c54e100c92375c9d980e2031e0a153245025 /lib/irc/client/command.ex
parentSome fixes (diff)
Cont. wipmaster
Diffstat (limited to 'lib/irc/client/command.ex')
-rw-r--r--lib/irc/client/command.ex11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/irc/client/command.ex b/lib/irc/client/command.ex
index a84324f..71b7a6b 100644
--- a/lib/irc/client/command.ex
+++ b/lib/irc/client/command.ex
@@ -31,7 +31,7 @@ defmodule Irc.Client.Command do
@doc """
Handles an incoming line.
"""
- @callback handle_line(Irc.Line.t(), Irc.Connection.t()) :: line_return
+ @callback handle_line(conn :: Irc.Connection.t(), line :: Irc.Line.t()) :: line_return
@doc """
Handles an incoming line when in buffering state.
@@ -40,11 +40,16 @@ defmodule Irc.Client.Command do
Postponed lines will be treated as usual (per their respective module) once the buffering state exits.
"""
- @callback handle_buffer(Irc.Line.t(), buffer, Irc.Connection.t()) :: buffer_return
+ @callback handle_buffer(conn :: Irc.Connection.t(), line :: Irc.Line.t(), buffer) :: buffer_return
@doc """
Handles a user requested command.
"""
- @callback handle_command(client_command :: atom, args :: list, Irc.Connection.t()) :: line_return
+ @callback handle_command(conn :: Irc.Connection.t(), client_command :: atom, args :: list) :: line_return
+
+ @doc """
+ Connection is stopped
+ """
+ @callback stop(conn :: Irc.Connection.t(), reason :: atom) :: any()
end