More readable logic
This commit is contained in:
parent
eeb655a0ac
commit
aaa395df3a
|
@ -52,16 +52,18 @@
|
||||||
(on-stop (when (current-other-source) (send* #:source (current-other-source) "PART" Ch)))
|
(on-stop (when (current-other-source) (send* #:source (current-other-source) "PART" Ch)))
|
||||||
(begin/dataflow
|
(begin/dataflow
|
||||||
(when (not (equal? (current-other-source) (next-other-source)))
|
(when (not (equal? (current-other-source) (next-other-source)))
|
||||||
(if (next-other-source) ;; not disconnecting, IOW
|
(cond
|
||||||
(if (initial-names-sent?)
|
[(not (next-other-source)) ;; other-conn is disconnecting
|
||||||
(if (current-other-source)
|
(send* #:source (current-other-source) "QUIT")]
|
||||||
(when (not (equal? this-conn other-conn)) ;; avoid dups for our own connection
|
[(not (initial-names-sent?)) ;; still gathering data for 353/366 below
|
||||||
(send* #:source (current-other-source) "NICK"
|
(initial-member-nicks (set-add (initial-member-nicks)
|
||||||
(irc-source-nick-nick (next-other-source))))
|
(irc-source-nick-nick (next-other-source))))]
|
||||||
(send* #:source (next-other-source) "JOIN" Ch))
|
[(not (current-other-source)) ;; other-conn is joining
|
||||||
(initial-member-nicks (set-add (initial-member-nicks)
|
(send* #:source (next-other-source) "JOIN" Ch)]
|
||||||
(irc-source-nick-nick (next-other-source)))))
|
[else ;; it's a nick change
|
||||||
(send* #:source (current-other-source) "QUIT"))
|
(when (not (equal? this-conn other-conn)) ;; avoid dups for our own connection
|
||||||
|
(send* #:source (current-other-source) "NICK"
|
||||||
|
(irc-source-nick-nick (next-other-source))))])
|
||||||
(current-other-source (next-other-source)))))
|
(current-other-source (next-other-source)))))
|
||||||
(on (asserted (ircd-channel-topic Ch $topic))
|
(on (asserted (ircd-channel-topic Ch $topic))
|
||||||
(if topic
|
(if topic
|
||||||
|
|
Loading…
Reference in New Issue