(sigil irc monitor)
(sigil irc monitor) - MONITOR command helpers (IRCv3)
MONITOR provides efficient online/offline presence tracking. Clients subscribe to a list of nicks and receive RPL-MONONLINE / RPL-MONOFFLINE notifications when those nicks change presence. This replaces the expensive WHOIS-polling pattern.
Subcommands (per https://ircv3.net/specs/extensions/monitor):
MONITOR + <nick>[,<nick>...] add nicks to your monitor list MONITOR - <nick>[,<nick>...] remove nicks MONITOR C clear list MONITOR L list current monitored nicks MONITOR S fetch current online/offline status
Server numerics:
730 (RPL-MONONLINE) "<client> :nick!user@host[,...]" they came online 731 (RPL-MONOFFLINE) "<client> :nick[,...]" they went offline 732 (RPL-MONLIST) "<client> :nick[,...]" list response 733 (RPL-ENDOFMONLIST) "<client> :End of MONITOR list" 734 (ERR-MONLISTFULL) "<client> <limit> <nick>[,...] :Monitor list is full."
Exports
monitor-commandprocedureConstruct a monitor-command struct.
monitor-command?procedureTest if a value is a monitor-command struct.
monitor-command-subcommandprocedureGet the subcommand field of a monitor-command struct.
monitor-command-targetsprocedureGet the targets field of a monitor-command struct.
parse-monitor-lineprocedureParse a MONITOR command into a monitor-command record. Returns #f on malformed input.
(parse-monitor-line (parse-irc-message "MONITOR + alice,bob"))
; => #<monitor-command subcommand: "+" targets: ("alice" "bob")>monitor-lineprocedureBuild a MONITOR client→server line.
(monitor-line "+" '("alice" "bob")) ; => "MONITOR + alice,bob\r\n"
(monitor-line "C") ; => "MONITOR C\r\n"monitor-online-linevariableBuild an RPL-MONONLINE (730) line. entries is a list of nick!user@host strings. Multiple targets are comma-joined per the spec.
monitor-offline-linevariableBuild an RPL-MONOFFLINE (731) line. nicks is a list of nick strings.
monitor-list-linevariableBuild an RPL-MONLIST (732) line. May be sent multiple times if the list is large.
monitor-end-of-list-linevariableBuild an RPL-ENDOFMONLIST (733) terminator.
monitor-list-full-linevariableBuild an ERR-MONLISTFULL (734) error: server's per-user limit reached. limit is the integer limit; nicks is the rejected targets.
MONITOR-ADDvariable(No description)
MONITOR-REMOVEvariable(No description)
MONITOR-CLEARvariable(No description)
MONITOR-LISTvariable(No description)
MONITOR-STATUSvariable(No description)