Here’s some examples of stuff you can do to configure rcirc.
;; You can autoload, but at the end of this block we'll ;; connect to two networks anyway. (require 'rcirc) ;; Don't print /away messages. ;; This does not require rcirc to be loaded already, ;; since rcirc doesn't define a 301 handler (yet). (defun rcirc-handler-301 (process cmd sender args) "/away message handler.") ;; Turn on spell checking. (add-hook 'rcirc-mode-hook (lambda () (flyspell-mode 1))) ;; Keep input line at bottom. (add-hook 'rcirc-mode-hook (lambda () (set (make-local-variable 'scroll-conservatively) 8192))) ;; Turn on logging everything to a special buffer, for debugging. (setq rcirc-debug-flag t) ;; Adjust the colours of one of the faces. (set-face-foreground 'rcirc-my-nick "red" nil) ;; Set typeface for rcirc buffers; this example uses variable-width Verdana size 10 (dolist (rcirc-face (remove-if-not (lambda (elt) (equal (cadr elt) 'custom-face)) (get 'rcirc-faces 'custom-group))) (set-face-font (car rcirc-face) "verdana-10")) ;; Include date in time stamp. (setq rcirc-time-format "%Y-%m-%d %H:%M ") ;; Change user info (setq rcirc-default-nick "chachi") (setq rcirc-default-user-name "carcola") (setq rcirc-default-full-name "scott baio") ;; Join these channels at startup. (setq rcirc-startup-channels-alist '(("\\.freenode\\.net$" "#emacs" "#rcirc"))) ;; Connect to servers. (rcirc); freenode is the default (rcirc-connect "localhost"); if you run bitlbee, this will connect to it
See BitlBee for an explanation of that last line.
rcirc-startup-channels-alist changed to rcirc-server-alist in Emacs 23, see http://www.gnu.org/software/emacs/manual/html_node/rcirc/Configuration.html. The example there did not work for me, the first time you set it the list does not yet exist use something like the following:
(setq rcirc-server-alist '(("irc.freenode.net" :channels ("#emacs" "#python" "#sml" "#nasm" "#gcc"))))
Apparently this line is not working anymore:
(rcirc); freenode is the default
This works in my tests:
Process and target are dynamically bound, so you only need to know about
(defun-rcirc-command bold (text) "Post a bold message to the current target." (interactive) (rcirc-send-message process target (concat "\002" text "\002")))