2019-01-28 13:50:49 +00:00
|
|
|
#lang imperative-syndicate
|
|
|
|
|
|
|
|
(provide (struct-out ircd-listener)
|
|
|
|
(struct-out ircd-motd)
|
|
|
|
|
|
|
|
(struct-out ircd-connection-info)
|
2019-01-29 20:46:38 +00:00
|
|
|
(struct-out ircd-channel)
|
2019-01-28 13:50:49 +00:00
|
|
|
(struct-out ircd-channel-member)
|
|
|
|
(struct-out ircd-channel-topic)
|
|
|
|
|
|
|
|
(struct-out ircd-action)
|
|
|
|
(struct-out ircd-event)
|
|
|
|
|
|
|
|
lookup-nick)
|
|
|
|
|
|
|
|
;; A Connection is a TcpAddress
|
|
|
|
|
2019-01-29 20:46:38 +00:00
|
|
|
(assertion-struct ircd-listener (port))
|
|
|
|
(assertion-struct ircd-motd (lines))
|
2019-01-28 13:50:49 +00:00
|
|
|
|
2019-01-29 20:46:38 +00:00
|
|
|
(assertion-struct ircd-connection-info (conn nick user))
|
|
|
|
(assertion-struct ircd-channel (channel))
|
|
|
|
(assertion-struct ircd-channel-member (channel conn))
|
|
|
|
(assertion-struct ircd-channel-topic (channel topic))
|
2019-01-28 13:50:49 +00:00
|
|
|
|
2019-01-29 20:46:38 +00:00
|
|
|
(message-struct ircd-action (conn message))
|
|
|
|
(message-struct ircd-event (conn message))
|
2019-01-28 13:50:49 +00:00
|
|
|
|
|
|
|
;;---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(define (lookup-nick conn)
|
|
|
|
(immediate-query [query-value #f (ircd-connection-info conn $N _) N]))
|