rcirc

Last major edit (later minor edits)

Summary: Missing parenthesis on connection string

Added:

> ===Warnings==
> ##gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data##
> If you're getting this warning, add the following to your init file:
> {{{
> (setq gnutls-min-prime-bits 1024)
> }}}
> There's [http://permalink.gmane.org/gmane.emacs.gnus.general/83425 an explanation on the mailing list].


rcirc is a next generation InternetRelayChat client. It blends seamlessly with the rest of Emacs, it’s tight, fast, and doesn’t light up like a christmas tree. rcirc also has sane defaults. There is little or no reason to customize it because it does what you want by default (except that many people still do).

rcirc is part of GNU Emacs since release 22.0.

Talking about rcirc

If you want to chat about rcirc, the place is #rcirc on freenode.

Getting rcirc

If you are running Emacs 22, you already have it. Skip this section.

To check out rcirc.el from EmacsFromCVS: GIT:net/rcirc.el.

New versions of rcirc do not work in Emacs 21. You can get the last version of rcirc working in Emacs 21 here: Lisp:rcirc.el.

Starting rcirc

In Emacs 22, just type M-x irc.

In Emacs 21 and/or a very old rcirc version, you will have to add this to your InitFile:

(eval-after-load "rcirc"                ; for Emacs 21
  '(if (not (functionp 'irc))
       (defun irc (x)
         (interactive "P")
         (if x
             (call-interactively 'rcirc)
           (rcirc rcirc-server rcirc-port rcirc-nick
                  (rcirc-startup-channels rcirc-server))))))

then just do as usual.

rcirc comes set up with default values for IRC server and port (irc.freenode.net 6667), nickname (your login name), and channel (#rcirc). You can override these settings in your InitFile or use C-u M-x rcirc to set these values. You also can define a key to start it for you:

(global-set-key (kbd "C-c I") 'irc)

Please also consider visiting these pages in order to getting started:

rcircExampleSettings
examples of stuff you can do to configure rcirc.
rcircAutoAuthentication
How to get automatic authentication with nickserv &c.

Connecting to servers using SSL/TLS

Emacs 24 has SSL support out of the box but rcirc doesn’t use it by default. Here’s how to set it up:

(setq rcirc-server-alist
      '(("irc.freenode.net" :port 6697 :encryption tls
	 :channels ("#rcirc" "#emacs" "#emacswiki"))))

Use post 6697. This requires an Emacs that has been built with GNU TLS or an appropriate gnutls-cli.

If you are on Windows, you can download a precompiled binary. Make sure the bin directory is on your path. Test it by calling gnutls-cli from ‘eshell’. This is what you would expect:

Welcome to the Emacs shell

~ $ gnutls-cli
No hostname specified

For Emacs 23 you need a fork of rcirc:

https://github.com/nealey/rcirc/wiki which makes possible to use an arbitrary connection method (ssl/proxy/whatever)

or this (SSL with an optional :use-tls for ‘rcirc-server-alist’ and :custom-connect-function for arbitrary connection method (ssl/proxy/whatever) similar to the neale’s patch) https://github.com/melmothx/rcirc/tree/to-emacs

Warnings

gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data

If you’re getting this warning, add the following to your init file:

(setq gnutls-min-prime-bits 1024)

There’s an explanation on the mailing list.

rcirc add-ons and commands

rcircColoredNicks
/color – color each nick using a separate color
rcircColoredNickClasses
Alternative scheme where nicks can belong to classes such as pals or bots
rcircColors
Handle escape sequences that convey text colors
rcircRetake
/retake – send RECOVER and RELEASE messages to NickServ
rcircReconnect
/reconnect – quit and reconnect immediately for users waking their laptop from sleep after the server has closed the connection
rcircAutoReconnect
Automatically reconnect when disconnected from the IRC server
rcircPounce
/pounce, /unpounce – store messages for people and send them when they join one of the channels you’re on
rcircSmiley
Add little ☺ and ☹ smileys
rcircAll
/all – run a command such as /away for all connections
rcircNoNamesOnJoin
How not to display NAMES list on channel JOIN (ugly hacks inside)
rcircShowVersion
/sv – show rcirc version
rcircAwayTime
Display how long you are/were away from IRC
rcircBack
Cancel your AWAY state with /back (requires rcircAwayTime)
rcircLogging
Log conversations to disk
rcircServerAuth
Patch that adds server authentication (PASS).
rcircAutoAway
Go /away after Emacs is idle for a period of time.
rcircSound
Play sounds through IRC using CTCP SOUND.
rcircEncoding
Change the encoding per channel
rcircLateFix
Correct original word when ‘s/wrong/right’ messages are seen.
rcircHelp
/help – list rcirc commands and show their documentation
rcircCommandCompletion
Let TAB complete commands and nicks
rcircDimNicks
Dim the entire line for nicks in ‘rcirc-dim-nicks’.
rcircNotify
Libnotify notification popups when someone talks to you
rcircInvisible
How to make yourself invisible (+i); how to advice ‘rcirc-connect’
rcircAutoFillColumn
Have your rcirc windows dynamically set fill-column instead of always being too long or too short
rcircGroupMode
propose an rcirc-groups buffer ala gnus Group, with refresh and catchup options (and RET to follow), in order to manage notifications in rcirc
rcircJoinRestrictedChannel
how to automatically join a restricted channel
rcircFacebook
how to use Facebook chat
rcircOccur
/occur – find stuff in all your rcirc buffers
rcircOperator
/op, /deop, /mute, /unmute, /ban, /unban, /kickban
rcircActivities
Minimal activity tracker, open for extension. Use rcirc-activities/switch-to-buffer to see and switch to buffers with activities, using ido.

Related stuff that might be of interest

rcirc for bs-show
A configuration for ‘M-x bs-show’ users
rcirc and iswitchb
Hiding IRC buffers from iswitchb
rcircNickBeep
Beep when your nick is mentioned.
rcircDing
Beep when there is activity in a hidden channel.
osx browse-url-browser-function
A browser function for OSX.
rcircUnambiguousNickCompletion
Don’t cycle-complete nicks if there is ambiguity
rcircAlwaysKickBastard
Start your session by kicking the evil bastard that’s stealing your nick
rcircPresence
Make rcirc tell something else about your presence status (I’m away!)
rcirc tracking with elscreen
when using elscreen the default “switch-to-buffer” function used by rcirc-track-minor-mode can be changed. To make rcirc switch to the screen where the buffer with the last activity is located simply add to your InitFile (setq rcirc-switch-to-buffer-function 'elscreen-find-and-goto-by-buffer). This has a problem though: automatic switching after some actions (joining a channel, for example) will stop working. One possible solution is:
(defun rcirc-switch-buffer-or-screen (buffer)
  (if (elscreen-find-screen-by-buffer buffer)
      (elscreen-find-and-goto-by-buffer buffer)
    (switch-to-buffer buffer)))
		
(setq rcirc-switch-to-buffer-function 'rcirc-switch-buffer-or-screen)
rcircThinklight
Make irc blink the Thinkpad light twice when someone talks to you.
rcircDbusNotification
use the dbus bindings for notifications
rcircOthmar
replace the text of /dim user’s speech with nonsense
rcircDisplayChannels
Display all open channel buffers (or query buffers) at once
rcircRandomNames
change all the nicks to random names

For developers:

rcircToDocument
A todo list for manual maintainers

Questions & Answers

VincentFoley asks: could anyone describe the differences between rcirc and ERC from an end-user point of view?

AlexSchroeder replies: For beginners, there should be no significant differences. After all, both claim to be easy-to-use IRC clients. The differences begin when customizing or hacking it. Neither of the two has introduced radical changes to the user interface.

WeakishJiang: I have not used ERC. But I found this piece on this page:

   I used ERC for a while, but I was not very fond of the 20 odd files required in 
   my elisp directory, so I switched to rcirc and haven’t looked back since. It does
   everything I need, the (very clean) code is contained in a single file, I’m very happy! 
   – VincentFoley

Hope it helps.


CategoryChatClient