Browse Source

Support multiple channels for /JOIN

Resolves #1
master
Epi Morphism 1 month ago
parent
commit
16b9c5aaad
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      ircd.rkt

+ 7
- 5
ircd.rkt View File

@@ -203,11 +203,13 @@
;; if the user hasn't joined any channels yet
(on-name-change conn old-nick nick))
(void)]
[(irc-message _ "JOIN" (list chan))
#:when (not (channel-joined? chan (irc-connection-channels conn)))
;; yes, let's start it in a new thread to create even more potential race conditions
;; XXX: this code was written by a dummy
(thread (lambda () (join-new-channel! conn chan)))]
[(irc-message _ "JOIN" (list chans-string))
(define chans (string-split chans-string ","))
(for ([chan chans]
#:when (not (channel-joined? chan (irc-connection-channels conn))))
;; yes, let's start it in a new thread to create even more potential race conditions
;; XXX: this code was written by a dummy
(thread (lambda () (join-new-channel! conn chan))))]
[(irc-message _ "PART" (list chan))
(part-and-remove-channel! conn chan)]
[(irc-message _ "MODE" (cons chan _))


Loading…
Cancel
Save