sig
type command =
PASS of string
| NICK of string
| USER of string list
| OPER of string * string
| MODE of string * string
| QUIT of string
| SQUIT of string * string
| JOIN of string list * string list
| JOIN0
| PART of string list * string
| TOPIC of string * string
| NAMES of string list
| LIST of string list
| INVITE of string * string
| KICK of string list * string * string
| PRIVMSG of string * string
| NOTICE of string * string
| PING of string
| PONG of string
| Other of string * string list
type t = { prefix : string option; command : Irc_message.command; }
val pass : string -> Irc_message.t
val nick : string -> Irc_message.t
val user : username:string -> mode:int -> realname:string -> Irc_message.t
val oper : name:string -> pass:string -> Irc_message.t
val mode : nick:string -> mode:string -> Irc_message.t
val quit : msg:string option -> Irc_message.t
val join : chans:string list -> keys:string list option -> Irc_message.t
val join0 : Irc_message.t
val part : chans:string list -> comment:string option -> Irc_message.t
val topic : chan:string -> topic:string option -> Irc_message.t
val names : chans:string list -> Irc_message.t
val list : chans:string list -> Irc_message.t
val invite : nick:string -> chan:string -> Irc_message.t
val kick :
chans:string list ->
nick:string -> comment:string option -> Irc_message.t
val privmsg : target:string -> string -> Irc_message.t
val notice : target:string -> string -> Irc_message.t
val ping : string -> Irc_message.t
val pong : string -> Irc_message.t
val other : cmd:string -> params:string list -> Irc_message.t
val to_string : Irc_message.t -> string
val output : Pervasives.out_channel -> Irc_message.t -> unit
val write_buf : Buffer.t -> Irc_message.t -> unit
type 'a or_error = ('a, string) Result.result
type parse_result = Irc_message.t Irc_message.or_error
exception ParseError of string * string
val parse : string -> Irc_message.t Irc_message.or_error
val parse_exn : string -> Irc_message.t
val extract_prefix : string -> string option * string
val extract_trail : string -> string * string option
end