Skip to content

Instantly share code, notes, and snippets.

@ckoch786
Last active December 18, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckoch786/5726571 to your computer and use it in GitHub Desktop.
Save ckoch786/5726571 to your computer and use it in GitHub Desktop.
Xchat plugin, join list of channels
#!/usr/bin/guile -s
!#
(define xchat:plugin-name "Ckoch786's xchat init, join channels")
(define xchat:plugin-description "Just my init, join channels")
(define xchat:plugin-version "1.0")
(define (xchat:plugin-init)
(format #t "loading plugin\n"))
(define (xchat:plugin-deinit)
(format #t "unloading plugin\n"))
(define (join-channels channel-ls)
(for-each join channel-ls))
(define (join channel)
(format #t "joining ~a\n" channel)
(let ((ls (list xchat:command (format #f "join ~a" channel))))
(apply (car ls) (cdr ls))))
(join-channels '("#bedrock" "#emacs" "#lisp" "#guile"))
@ckoch786
Copy link
Author

ckoch786 commented Jun 7, 2013

Joining #bedrock
ERROR: In procedure memoization:
ERROR: Bad binding (append (quote (xchat:command "join")) (quote (channel))) in expression (let ls ((append (quote (xchat:command "join")) (quote (channel)))) (apply (car ls) (cdr ls))).

@ckoch786
Copy link
Author

ckoch786 commented Jun 7, 2013

Updated as per suggestions from mark_weaver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment