2024-01-31 21:02:40 +00:00
|
|
|
include Data
|
2024-01-23 19:23:45 +00:00
|
|
|
include Irc
|
2024-01-07 20:54:39 +00:00
|
|
|
|
|
|
|
type sockaddr = Unix.sockaddr
|
|
|
|
type fd = Lwt_unix.file_descr
|
|
|
|
|
|
|
|
let pp_sockaddr ppf = function
|
|
|
|
| Unix.ADDR_INET (adr, port) -> Fmt.pf ppf "%s:%d" (Unix.string_of_inet_addr adr) port
|
|
|
|
| Unix.ADDR_UNIX path -> Fmt.string ppf path
|
2024-01-08 05:55:53 +00:00
|
|
|
|
2024-01-31 21:47:42 +00:00
|
|
|
let pp_unixtime ppf t =
|
|
|
|
let dt = Ptime.diff t Ptime.epoch in
|
|
|
|
Fmt.pf ppf "%.0f" (Ptime.Span.to_float_s dt)
|
2024-01-11 04:38:25 +00:00
|
|
|
|
|
|
|
module Result_syntax = struct
|
|
|
|
let ( let* ) = Result.bind
|
|
|
|
let ( let+ ) r f = Result.map f r
|
|
|
|
end
|
2024-01-12 02:49:48 +00:00
|
|
|
|
|
|
|
include (val Logging.logs "Irc")
|