2017-08-10 19:17:28 +00:00
|
|
|
#lang syndicate
|
2017-07-30 22:50:45 +00:00
|
|
|
|
|
|
|
(provide (struct-out ircd-listener)
|
|
|
|
(struct-out ircd-motd)
|
|
|
|
|
|
|
|
(struct-out ircd-connection-info)
|
|
|
|
(struct-out ircd-channel-member)
|
|
|
|
(struct-out ircd-channel-topic)
|
|
|
|
|
|
|
|
(struct-out ircd-action)
|
2017-07-30 23:28:21 +00:00
|
|
|
(struct-out ircd-event)
|
|
|
|
|
|
|
|
lookup-nick)
|
2017-07-30 22:50:45 +00:00
|
|
|
|
|
|
|
;; A Connection is a TcpAddress
|
|
|
|
|
|
|
|
(struct ircd-listener (port) #:prefab) ;; assertion
|
|
|
|
(struct ircd-motd (lines) #:prefab) ;; assertion
|
|
|
|
|
|
|
|
(struct ircd-connection-info (conn nick user) #:prefab) ;;assertion
|
|
|
|
(struct ircd-channel-member (channel conn) #:prefab) ;; assertion
|
|
|
|
(struct ircd-channel-topic (channel topic) #:prefab) ;; assertion
|
|
|
|
|
|
|
|
(struct ircd-action (conn message) #:prefab) ;; message
|
|
|
|
(struct ircd-event (conn message) #:prefab) ;; message
|
2017-07-30 23:28:21 +00:00
|
|
|
|
|
|
|
;;---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(define (lookup-nick conn)
|
|
|
|
(immediate-query [query-value #f (ircd-connection-info conn $N _) N]))
|