Library
Module
Module type
Parameter
Class
Class type
module I : Irc_client.CLIENT with type 'a Io.t = 'a Lwt.t
type connection = I.connection_t
val connection : connection
Current connection.
val init : unit Lwt.t
val exit : unit Lwt.t
val log : string -> unit Lwt.t
Log a message (see field irc_log
of Config
.config), typically for debugging purpose.
val logf : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
Pretty logger (calling log
to print the formatted message). Example: logf "answer to %s is %d" "life" 42
val set_log : (string -> unit Lwt.t) -> unit
Set logger (default is the empty logger) that will be used by log
trigger the exit
signal (only at the end!)
val line_cut_threshold : int ref
Above !line_cut_threshold
, multi-line messages are cut with "..."
val send_privmsg_l : target:string -> messages:string list -> unit Lwt.t
Send a list of messages to the target. If the list is too long (see line_cut_threshold
) only a prefix of the list will be sent
val send_privmsg_l_nolimit :
?delay:float ->
target:string ->
messages:string list ->
unit ->
unit Lwt.t
Version of send_privmsg_l
that does not enforce cut threshold. Be careful of the flood this might cause.
val send_privmsg : target:string -> message:string -> unit Lwt.t
Helper for sending messages, splitting lines, etc.
val send_notice_l : target:string -> messages:string list -> unit Lwt.t
Send a list of notices. Notices are not supposed to be parsed by other bots, so as to avoid reply loops
val send_notice : target:string -> message:string -> unit Lwt.t
Helper for sending notices, splitting lines, etc.
val send_join : channel:string -> unit Lwt.t
Send a "join" messages to try and join some channel
val send_part : channel:string -> unit Lwt.t
Send a "part" messages to try and part some channel