Packages

A library that allows connecting to Freelancer game servers via an FLHook socket to run commands and receive events.

Current section

Files

Jump to
fl_hook_client lib fl_hook command.ex
Raw

lib/fl_hook/command.ex

defprotocol FLHook.Command do
@moduledoc """
A protocol to implement custom commands.
"""
@type serializable ::
String.t()
| [String.Chars.t()]
| {String.t(), [String.Chars.t()]}
@doc """
Returns a command string or tuple. It may even return another command except
itself.
"""
@spec to_cmd(t) :: serializable
def to_cmd(cmd)
end