package calculon

  1. Overview
  2. Docs

User-defined config

type t = {
  1. server : string;
    (*

    Address of the irc server

    *)
  2. port : int;
    (*

    Port of the server

    *)
  3. username : string;
  4. password : string option;
  5. realname : string;
  6. nick : string;
  7. tls : bool;
  8. tls_cert : Ssl.certificate option;
  9. sasl : bool;
  10. channel : string;
    (*

    Channel to join after the connexion to the server

    *)
  11. state_file : string;
    (*

    Where plugins' state is stored

    *)
  12. log_level : Logs.level;
    (*

    Level of logging.

    • since 0.6
    *)
  13. prefix : string;
    (*

    prefix for commands

    *)
}
val default : t

Default configuration:

  • server = "irc.libera.chat"
  • port = 7000
  • username = "calculon"
  • realname = "calculon"
  • password = None
  • nick = "calculon"
  • tls = true
  • tls_cert = None
  • sasl = true
  • channel = "#ocaml"
  • state_file = "state.json"
  • irc_log = `None
  • log_level = Logs.Warning
  • prefix = "!"
val parse : ?extra_args:(string * Arg.spec * string) list -> t -> string array -> t

parse conf args is the same as conf, but some command line arguments can override its fields

  • parameter extra_args

    additional command line arguments for Arg (since NEXT_RELEASE)

val of_argv : ?extra_args:(string * Arg.spec * string) list -> unit -> t

Parsed from Sys.argv Will call exit if Arg.parse fails

  • parameter extra_args

    additional command line arguments for Arg (since NEXT_RELEASE)

OCaml

Innovation. Community. Security.