Pinned channels
This commit is contained in:
parent
ed0307d4e5
commit
9c5d9768b4
|
@ -7,8 +7,12 @@
|
|||
|
||||
(spawn #:name 'channel-factory
|
||||
(stop-when-reloaded)
|
||||
(during/spawn (ircd-channel-member $Ch _)
|
||||
#:name `(ircd-channel ,Ch)
|
||||
|
||||
(during (ircd-channel-member $Ch _)
|
||||
(assert (ircd-channel Ch)))
|
||||
|
||||
(during/spawn (ircd-channel $Ch)
|
||||
#:name (ircd-channel Ch)
|
||||
(field [topic #f])
|
||||
(assert (ircd-channel-topic Ch (topic)))
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
(during (config 'ircd `(port ,$port))
|
||||
(assert (ircd-listener port)))
|
||||
|
||||
(during (config 'ircd `(channel ,$Ch))
|
||||
(assert (ircd-channel Ch)))
|
||||
|
||||
(define/query-set motds (config 'ircd `(motd ,$text)) text)
|
||||
(assert (ircd-motd (append*
|
||||
(map (lambda (t) (string-split t "\n"))
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
(port 6667)
|
||||
(motd "Hello, world!")
|
||||
(channel "#syndicate")
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
(struct-out ircd-motd)
|
||||
|
||||
(struct-out ircd-connection-info)
|
||||
(struct-out ircd-channel)
|
||||
(struct-out ircd-channel-member)
|
||||
(struct-out ircd-channel-topic)
|
||||
|
||||
|
@ -14,15 +15,16 @@
|
|||
|
||||
;; A Connection is a TcpAddress
|
||||
|
||||
(struct ircd-listener (port) #:prefab) ;; assertion
|
||||
(struct ircd-motd (lines) #:prefab) ;; assertion
|
||||
(assertion-struct ircd-listener (port))
|
||||
(assertion-struct ircd-motd (lines))
|
||||
|
||||
(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
|
||||
(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))
|
||||
|
||||
(struct ircd-action (conn message) #:prefab) ;; message
|
||||
(struct ircd-event (conn message) #:prefab) ;; message
|
||||
(message-struct ircd-action (conn message))
|
||||
(message-struct ircd-event (conn message))
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue