I’m digging on the Circe as my IRC client of choice. Just have to install it’s package:
(packages-install '(circe))
(require 'circe)
Which means we can create my connections to my servers:
(add-to-list 'circe-network-options
'("Ciphermonkeys"
:host "irc.ciphermonkeys.org"
:nick "ha"
:channels ("#1101")))
(add-to-list 'circe-network-options
'("Freenode"
:nick "howardabrams"
:channels ("#emacs" "#clojure-pdx")
:nickserv-password ,freenode-password)
)
(defun circe-connect-all ()
"Connects to my favorite IRC servers and channels."
(interactive)
(circe "Ciphermonkeys")
(circe "Freenode"))
Simplify the channel output.
(setq circe-format-say "{nick}> {body}")
Let’s hide all the JOIN, PART and other messages that I don’t care about:
(circe-set-display-handler "JOIN" (lambda (&rest ignored) nil))
(circe-set-display-handler "PART" (lambda (&rest ignored) nil))
(circe-set-display-handler "QUIT" (lambda (&rest ignored) nil))
(setq circe-reduce-lurker-spam t)
Circe (actually, lui) has the ability to intercept long pastes if it is done in a single input. Lui will then ask if the user would prefer to use a paste service.
(require 'lui-autopaste)
(add-hook 'circe-channel-mode-hook 'enable-lui-autopaste)
Who can really spell, amirite?
(setq lui-flyspell-p t
lui-flyspell-alist '((".*" "american")))
Since I often run my IRC in a smaller window, I need to allow for the timestamps to be in a margin, so that we can wrap correctly.
(setq lui-time-stamp-position 'right-margin
lui-time-stamp-format "%H:%M")
(add-hook 'lui-mode-hook 'my-circe-set-margin)
(defun my-circe-set-margin ()
(setq right-margin-width 5))
(setq lui-time-stamp-position 'right-margin
lui-fill-type nil)
(add-hook 'lui-mode-hook 'my-lui-setup)
(defun my-lui-setup ()
(setq
fringes-outside-margins t
right-margin-width 5
word-wrap t
wrap-prefix " "))
Make sure that we can simply require
this library.
(provide 'init-irc)
Before you can build this on a new system, make sure that you put
the cursor over any of these properties, and hit: C-c C-c