Add repl.scm (can't believe I forgot it before!) and use it in irc.scm
[8sync.git] / demos / irc.scm
index 7a8d2ab020e478b740699b893e12fb24cd525c00..2ff8c8cfda8360003f7dc90cc2ec6e521f8b3053 100755 (executable)
                    default-irc-port))
          (username (option-ref options 'username #f))
          (listen (option-ref options 'listen #f))
-         (channels (option-ref options 'channels "")))
+         (channels (option-ref options 'channels ""))
+         (agenda (make-agenda)))
     (display `((server ,hostname) (port ,port) (username ,username)
                (listen ,listen) (channels-split ,(string-split channels #\space))))
     (newline)
+    (if listen
+        (spawn-and-queue-repl-server! agenda))
     (queue-and-start-irc-agenda!
-     (make-agenda)
+     agenda
      (irc-socket-setup hostname port)
      #:inet-port port
      #:username username