From: Alex S. <al...@em...> - 2003-01-20 22:56:05
|
Damien Elmes <re...@re...> writes: > ;; autojoin particular channels when connecting to certain networks > (defvar erc-autojoin-channels-alist > '(("openprojects\\|freenode" . ("#emacs")))) > > (defun erc-autojoin-channels (server nick) > (dolist (l erc-autojoin-channels-alist) > (when (string-match (car l) server) > (dolist (chan (cdr l)) > (erc-send-command (concat "join " chan)))))) > (add-hook 'erc-after-connect 'erc-autojoin-channels) > > This will obviously connect you to those channels on an initial join > as well - but if the channels you stay on don't vary with time, this > should suffice until we improve the autoconnection support. after every JOIN and PART we could update this alist -- that would solve the problem, no? Alex. |