package calculon

  1. Overview
  2. Docs

Social: keeps a register "nick -> informations" up-to-date. The type contact can be extended to store new informations.

One must then extend the function contacts_of_json and json_of_contact to handle the new fields (and deal with the case where we import old JSON values that don't have the new fields, e.g. by using a default value).

The data stored in the contacts base are usually automatically updated by callbacks defined in Social (thanks to Signal.on).

type to_tell = {
  1. from : string;
  2. on_channel : string;
  3. msg : string;
  4. tell_after : float option;
    (*

    optional; not before this deadline (UTC)

    *)
}
type contact = {
  1. last_seen : float;
  2. to_tell : to_tell list;
  3. ignore_user : bool;
}
type state
val data : state -> string -> contact
val set_data : state -> ?force_sync:bool -> string -> contact -> unit
val plugin : Plugin.t
OCaml

Innovation. Community. Security.