(Wdired): Mention C-x C-q key binding.
[bpt/emacs.git] / man / rcirc.texi
CommitLineData
97ed0ac3
EZ
1\input texinfo
2@c %**start of header
3@setfilename ../info/rcirc
4@settitle rcirc Manual
5@c %**end of header
6
7@copying
4e6835db 8Copyright @copyright{} 2006, 2007 Free Software Foundation, Inc.
97ed0ac3
EZ
9
10@quotation
11Permission is granted to copy, distribute and/or modify this document
12under the terms of the GNU Free Documentation License, Version 1.2 or
13any later version published by the Free Software Foundation; with no
14Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
15and with the Back-Cover Texts as in (a) below. A copy of the license is
16included in the section entitled ``GNU Free Documentation License'' in
17the Emacs manual.
18
19(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
20this GNU Manual, like GNU software. Copies published by the Free
21Software Foundation raise funds for GNU development.''
22
23This document is part of a collection distributed under the GNU Free
24Documentation License. If you want to distribute this document
25separately from the collection, you can do so by adding a copy of the
26license to the document, as described in section 6 of the license.
27@end quotation
28@end copying
29
30@dircategory Emacs
31@direntry
62e77f3d 32* Rcirc: (rcirc). Internet Relay Chat (IRC) client.
97ed0ac3
EZ
33@end direntry
34
35@titlepage
36@title rcirc Manual
37@page
38@vskip 0pt plus 1filll
39@insertcopying
40@end titlepage
41
42@ifnottex
43@node Top, Basics, (dir), (dir)
44@top rcirc Manual
45@end ifnottex
46
47@code{rcirc} is an Emacs IRC client.
48
49IRC (Internet Relay Chat) is a multi-user chat protocol. Users
50communicate with each other in real-time. Communication occurs both in
51topic channels which are collections of many users, or privately, with
52just one other user.
53
54@menu
62e77f3d
LT
55* Basics::
56* Reference::
57* Hacking and Tweaking::
84247bb5 58* GNU Free Documentation License::
62e77f3d
LT
59* Key Index::
60* Variable Index::
61* Index::
97ed0ac3
EZ
62
63@detailmenu
64 --- The Detailed Node Listing ---
65
66Basics
67
68* Internet Relay Chat::
69* Getting started with rcirc::
70
71Reference
72
73* rcirc commands::
74* Useful IRC commands::
75* Configuration::
76
77Hacking and Tweaking
78
79* Skipping /away messages using handlers::
80* Using fly spell mode::
81* Scrolling conservatively::
82* Changing the time stamp format::
83* Defining a new command::
84* Reconnecting after you have lost the connection::
85
86@end detailmenu
87@end menu
88
89@node Basics, Reference, Top, Top
90@chapter Basics
97ed0ac3
EZ
91
92This chapter contains a brief introduction to IRC (Internet Relay Chat),
93and a quick tutorial on @code{rcirc}.
94
95@menu
62e77f3d
LT
96* Internet Relay Chat::
97* Getting started with rcirc::
97ed0ac3
EZ
98@end menu
99
100@node Internet Relay Chat, Getting started with rcirc, Basics, Basics
101@section Internet Relay Chat
102@cindex internet relay chat
103@cindex irc
104
105@cindex channel
106@dfn{Internet Relay Chat} (IRC) is a form of instant communication over the
107Internet. It is mainly designed for group (many-to-many) communication
108in discussion forums called channels, but also allows one-to-one
109communication.
110
111@cindex instant messaging, comparison
112@cindex server
113@cindex network
114Contrary to most Instant Messenger (IM) systems, users usually don't
115connect to a central server. Instead, users connect to a random server
116in a network, and the servers share information between them.
117
118Here's a typical example:
119
120@cindex redirection to random servers
121When you connect to the Freenode network
b4a349d1 122(@code{http://freenode.net/}), you point your IRC client at the
97ed0ac3
EZ
123server @code{irc.freenode.net}. That server will redirect your client
124to a random server on the network, such as @code{zelazny.freenode.net}.
125
d177d64e 126@cindex channel name
97ed0ac3
EZ
127@cindex # starts a channel name
128Once you're connected, you can send messages to all other users
129connected to the same network, and you can join all channels on the same
130network. You might join the @code{#emacs} and the @code{#rcirc}
131channels, for example. (Typically, channel names begin with a hash
132character.)
133
134Once you have joined a channel, anything you type will be broadcast to
135all the other users on the same channel.
136
137@cindex addressing other people
138@cindex other people, addressing them
139@cindex talk to other people
fe5a02b3
AS
140If you want to address someone specifically, for example as an answer to
141a question, it is customary to prefix the message with the nick followed
142by a colon, like this:
97ed0ac3
EZ
143
144@example
145deego: fsbot rules!
146@end example
147
148@cindex nick completion
149@cindex completion of nicks
150@kindex TAB
151Since this is so common, you can use @key{TAB} to do nick completion.
152
153@node Getting started with rcirc, , Internet Relay Chat, Basics
154@section Getting started with rcirc
155@cindex getting started
156@cindex connecting to a server
157
158@cindex irc command
fe5a02b3
AS
159Use the command @kbd{M-x irc} to connect using the defaults.
160@xref{Configuration}, if you want to change the defaults.
161
162Use @kbd{C-u M-x irc} if you don't want to use the defaults, eg. if you
163want to connect to a different network, or connect to the same network
164using a different nick. This will prompt you for four things:
97ed0ac3
EZ
165
166@table @asis
167@cindex server, connecting
168@cindex Freenode network
169@item IRC server
170What server do you want to connect to? All the servers in a particular
171network are equivalent. Some networks use a round-robin system where a
172single server redirects new connections to a random server in the
173network. @code{irc.freenode.net} is such a server for the Freenode
174network. Freenode provides the network ``for the Free and Open Source
175Software communities, for not-for-profit organisations and for related
176communities and organizations.''
177
178@cindex port, connecting
179@cindex 6667, default IRC port
180@item IRC port
181All network connections require a port. Just as web servers and clients
182use port 80 per default, IRC uses port 6667 per default. You rarely
183have to use a different port.
184
185@cindex nick, connecting
186@cindex changing nick
187@cindex name changes
188@item IRC nick
189@vindex user-login-name
190Every users needs a handle on-line. You will automatically be assigned
191a slightly different nick if your chosen nick is already in use. If
fe5a02b3 192your @code{user-login-name} is @code{alex}, and this nick is already
97ed0ac3
EZ
193in use, you might for example get assigned the nick @code{alex`}.
194
195@cindex channels, connecting
196@cindex initial channels
197@cindex startup channels
198@item Channels
199A space separated list of channels you want to join when connecting.
200You don't need to join any channels, if you just want to have one-to-one
201conversations with friends on the same network. If you're new to the
fe5a02b3
AS
202Freenode network, join @code{#emacs}, the channel about all things
203Emacs, or join @code{#rcirc}, the channel about @code{rcirc}.
97ed0ac3
EZ
204@end table
205
206@cindex server buffer
207When you have answered these questions, @code{rcirc} will create a server
208buffer, which will be named something like @code{*irc.freenode.net*},
209and a channel buffer for each of the channels you wanted to join.
210
211@kindex RET
212@cindex talking
213@cindex communicating
214To talk in a channel, just type in what you want to say in a channel
d177d64e 215buffer, and press @key{RET}.
97ed0ac3
EZ
216
217@kindex C-c C-c
218@cindex multiline messages
219@cindex messages, multiple lines
220@cindex pasting multiple lines
221@cindex edit message before sending
222If you want to paste multiple lines, such as source code, you can use
223@kbd{C-c C-c} to edit your message in a separate buffer. Use @kbd{C-c
d177d64e 224C-c} to finish editing. You still need to press @key{RET} to send it,
97ed0ac3
EZ
225though. Generally, IRC users don't like people pasting more than around
226four lines of code, so use with care.
227
97ed0ac3
EZ
228@node Reference, Hacking and Tweaking, Basics, Top
229@chapter Reference
230@cindex reference
231
232This is the reference section of the manual. It is not complete. For
233complete listings of @code{rcirc} features, use Emacs built-in
234documentation.
235
236@menu
62e77f3d
LT
237* rcirc commands::
238* Useful IRC commands::
239* Configuration::
97ed0ac3
EZ
240@end menu
241
242@node rcirc commands, Useful IRC commands, Reference, Reference
243@section rcirc commands
d177d64e 244@cindex rcirc commands
97ed0ac3
EZ
245@cindex commands
246
247@kindex C-h m
248This is a list of commands that you may use in @code{rcirc}. It is not
249complete. For a complete listing, press @kbd{C-h m} in an @code{rcirc}
250buffer.
251
252In addition to using regular Emacs key bindings, you can call them by
253typing them into an @code{rcirc} buffer.
254
255@cindex call commands
256@cindex typing commands
257@cindex commands
258For instance, instead of using the command @kbd{C-c C-j} to join a new
d177d64e 259channel, you may type this in an @code{rcirc} buffer, and press @key{RET}:
97ed0ac3
EZ
260
261@example
262/join #emacs
263@end example
264
265@cindex / starts a command
266@cindex messages starting with a slash disappear
267@cindex disappearing messages if starting with a slash
268@cindex slash hides message
269This is why you cannot start a message with a slash. You will have to
270precede the command with a space, or rewrite your message in order to
271send it to a channel.
272
273@cindex multiple words as parameters
274@cindex string delimiters
275@cindex quotes
276@cindex double-quotes
277Many commands take parameters. IRC commands usually ignore string
278delimiters. Neither quote nor double-quote have special meanings in
279IRC.
280
281@example
282/nick "alex schroeder"
283@end example
284
285This will try to change your nick to @code{"alex}. Usually this will
286fail because the double quote character is not a legal character for
287nicks.
288
289@cindex case insensitive commands
290These commands are case insensitive.
291
292@cindex new command
293@cindex unknown command
294@cindex command unknown
295If a command isn't known by @code{rcirc}, it will simply be sent along to the
296server. There is a list of some useful commands like that in the next
297section.
298
299@table @kbd
300@item C-c C-j
301@kindex C-c C-j
302@cindex /join
303@cindex join channels
304@cindex other channels
305@cindex rooms, joining
306@cindex discussion, joining
307This joins a channel such as @code{#rcirc} or @code{#emacs}. On most
308networks, anybody can create new channels. If you want to talk with
309some friends, for example, all you have to do is agree on a valid
310channel name and join that channel. (Also @code{/join #emacs}.)
311
312@item C-c C-p
313@kindex C-c C-p
314@cindex /part
315@cindex part a channel
316@cindex leave a channel
317@cindex disconnect from a channel
318@cindex stop talking on a channel
319@cindex kill channel buffer
320This leaves the current channel. You can optionally provide a reason
321for parting. When you kill a channel buffer, you automatically part the
322corresponding channel. (Also @code{/part you are too weird!}.)
323
324@item C-c C-r
325@kindex C-c C-r
326@cindex /nick
327@cindex change name
328@cindex nick changing
329@cindex rename yourself
330@cindex other name
331This changes your nick to some other name. Your nick must be unique
332across the network. Most networks don't allow too many nick changes in
333quick succession, and have restrictions on the valid characters in nick
334names. (Also @code{/nick alex-test})
335
336@item C-c C-w
337@kindex C-c C-w
338@cindex /whois
339@cindex who are these people
340@cindex identifying people
341@cindex channels other people are on
342@cindex what channels people are on
343Gives you some basic information about a nick. This often includes what
344other channels people are on. (Also @code{/whois fsbot}.)
345
346@item C-c C-q
347@kindex C-c C-q
348@cindex /query
349@cindex starting a private conversation
350@cindex one-to-one conversation
351@cindex talk privately
352@cindex private conversation
353@cindex contact one person only
354@cindex query a person
355Starts a one-to-one conversation with another person on the same
356network. A new buffer will be created for this conversation. It works
357like a channel with only two members. (Also @code{/query fsbot}.)
358
d177d64e 359@item C-c @key{RET}
97ed0ac3
EZ
360@kindex C-c RET
361@cindex /msg
362@cindex single message
363@cindex message sending
364This sends a single message to a nick. Like with @kbd{C-c C-q}, a new
365buffer is created, where the response from the other party will show
366up. (Also @code{/msg nickserv identify secret}.)
367
368@item C-c C-x
369@kindex C-c C-x
370@cindex /quit
371@cindex quit
372@cindex disconnect
373@cindex kill connection
374@cindex connection end
375@cindex part all channels
376@cindex end connection
377@cindex server buffer killing
378@cindex reason for quitting
379This disconnects from the server and parts all channels. You can
380optionally provide a reason for quitting. When you kill the server
381buffer, you automatically quit the server and part all channels. (Also
382@code{/quit ZZZzzz...}.)
383@end table
384
385Some commands may not have a key binding, but only be available as typed
386commands, such as:
387
388@table @code
389@item /ignore
390@cindex /ignore
391@cindex ignoring other people
392@cindex trolls, ignoring
393@cindex hide some posts
394@cindex idiots online
395This command toggles the ignore status of a nick, if you provide one.
396If you don't provide a nick, the command lists all the nicks you are
d177d64e
AS
397ignoring. All messages by ignored nicks are---you guessed it---ignored.
398Since only ``operators'' can kick people from channels, the
97ed0ac3
EZ
399ignore command is often the only way to deal with some of the more
400obnoxious fellows online. Example: @code{/ignore xah}.
401@end table
402
403@node Useful IRC commands, Configuration, rcirc commands, Reference
404@section Useful IRC commands
405@cindex irc commands
406@cindex commands
407
408As mentioned, if a command isn't known by @code{rcirc}, it will simply be sent
409along to the server. Some such commands are available on nearly all IRC
410servers, such as:
411
412@table @code
413@item /away
414@cindex /away
415@cindex away status
416@cindex pause status
417@cindex unavailable status
418@cindex set away status
419This sets your status as ``being away'' if you provide a reason, or sets
420your status as ``being back'' if you do not. People can use the
421@kbd{C-c C-w} command to check your status. Example: @code{/away food}.
422@end table
423
424@cindex irc resources
425@cindex help about irc
426Typical IRC servers implement many more commands. You can read more
427about the fantastic world of IRC online at
b4a349d1
EZ
428@uref{http://www.irchelp.org/, the Internet Relay Chat (IRC) help
429archive}.
97ed0ac3
EZ
430
431@node Configuration, , Useful IRC commands, Reference
432@section Configuration
d177d64e 433@cindex configuring rcirc
97ed0ac3
EZ
434
435These are some variables you can change to configure @code{rcirc} to your
436liking.
437
438@table @code
fe5a02b3
AS
439@item rcirc-default-server
440@vindex rcirc-default-server
97ed0ac3
EZ
441the default server to connect to.
442
fe5a02b3
AS
443@item rcirc-default-port
444@vindex rcirc-default-port
97ed0ac3
EZ
445the default port to connect to.
446
fe5a02b3
AS
447@item rcirc-default-nick
448@vindex rcirc-default-nick
97ed0ac3
EZ
449the default nick to use.
450@end table
451
452@example
fe5a02b3
AS
453(setq rcirc-default-server "irc.mozilla.org"
454 rcirc-default-port 6666
455 rcirc-default-nick "alx")
97ed0ac3
EZ
456@end example
457
fe5a02b3 458@vindex rcirc-default-user-full-name
97ed0ac3
EZ
459@cindex full name
460@cindex real name
461@cindex surname
fe5a02b3
AS
462@code{rcirc-default-user-full-name} is used to set your ``real name'' on
463IRC. It defaults to @code{user-full-name}. If you want to hide your
464full name, you might want to set it to some pseudonym.
97ed0ac3
EZ
465
466@example
fe5a02b3 467(setq rcirc-default-user-full-name "Curious Minds Want To Know")
97ed0ac3
EZ
468@end example
469
470@vindex rcirc-startup-channels-alist
471@cindex channels, configuration
472@cindex initial channels, configuration
473@cindex startup channels, configuration
474@code{rcirc-startup-channels-alist} is the alist of channels to join
475when connecting to a particular network. An alist is a list of lists.
476Each sublist starts with a regular expression that is compared to the
477server address you're connecting to. The remaining sublist items are
478the channels to join.
479
480@example
481(setq rcirc-startup-channels-alist
482 '(("\\.freenode\\.net$" "#emacs" "#rcirc" "#wiki")))
483@end example
484
485Note the subtle problem, here --- IRC clients connect to servers, and
486there is no way of knowing which servers belong to a particular network.
487In the example above we're exploiting a naming convention used by within
488the Freenode network --- all servers within the network have a host in
489the @code{freenode.net} domain.
490
fe5a02b3
AS
491@vindex rcirc-authinfo
492@cindex authentification
493@cindex identification
494@cindex nickserv
495@cindex login
496@code{rcirc-authinfo} is an alist used to automatically identify
497yourself on networks. Each sublist starts with a regular expression
498that is compared to the server address you're connecting to. The second
499element in the list is a symbol representing the method to use, followed
500by the arguments this method requires.
501
502Here is an example to illustrate how you would set it:
503
504@example
e96b0051 505(setq rcirc-authinfo
fe5a02b3
AS
506 '(("freenode" nickserv "bob" "p455w0rd")
507 ("freenode" chanserv "bob" "#bobland" "passwd99")
508 ("bitlbee" bitlbee "robert" "sekrit")))
509@end example
510
511And here are the valid method symbols and the arguments they require:
512
513@table @code
514@item nickserv
515@cindex nickserv authentification
516Use this symbol if you need to identify yourself as follows when
517connecting to a network: @code{/msg nickserv identify secret}. The
518necessary arguments are the nickname you want to use this for, and the
519password to use.
520
521Before you can use this method, you will have to register your nick and
522pick a password for it. Contact @code{nickserv} and check out the
523details. (Using @code{/msg nickserv help}, for example.)
524
525@item chanserv
526@cindex chanserv authentification
527Use this symbol if you need to identify yourself as follows if you want
528to join a particular channel: @code{/msg chanserv identify #underground
529secret}. The necessary arguments are the nickname and channel you want
530to use this for, and the password to use.
531
532Before you can use this method, a channel contact must tell you about
533the password to use. Contact @code{chanserv} and check out the details.
534(Using @code{/msg chanserv help}, for example.)
535
536@item bitlbee
537@cindex bitlbee authentification
538Use this symbol if you need to identify yourself in the Bitlbee channel
539as follows: @code{identify secret}. The necessary arguments are the
540nickname you want to use this for, and the password to use.
541
542@cindex gateway to other IM services
543@cindex instant messaging, other services
544@cindex Jabber
545@cindex AIM
546@cindex ICQ
547@cindex MSN
548@cindex Yahoo!
549Bitlbee acts like an IRC server, but in fact it is a gateway to a lot of
550other instant messaging services. You can either install Bitlbee
551locally or use a public Bitlbee server. There, you need to create an
552account with a password. This is the nick and password you need to
553provide for the bitlbee authentification method.
554
555Later, you will tell Bitlbee about your accounts and passwords on all
556the other instant messaging services, and Bitlbee will log you in. All
557@code{rcirc} needs to know, is the login to your Bitlbee account. Don't
558confuse the Bitlbee account with all the other accounts.
559@end table
560
561@kindex C-c C-SPC
562@vindex rcirc-track-minor-mode
563@cindex switching channels
564@cindex tracking activity
565@cindex active channel
566@cindex abbreviated channel names
567@cindex modeline tracks activity
568Most people want a notification when something is said on a channel they
569have joined, particularly if they have been addressed directly. There
570is a global minor mode that will do this kind of tracking for you. All
571you need to do is switch it on using @kbd{M-x rcirc-track-minor-mode}.
572To make this permanent, add the following to your init file:
573
574@example
575(rcirc-track-minor-mode 1)
576@end example
577
578When other people say things in buffers that are currently buried (no
579window is showing them), the mode line will now show you the abbreviated
580channel or nick name. Use @kbd{C-c C-@key{SPC}} to switch to these
581buffers.
582
583@vindex rcirc-mode-hook
584If you prefer not to load @code{rcirc} immediately, you can delay the
585activation of this mode:
586
587@example
588(add-hook 'rcirc-mode-hook
589 (lambda ()
590 (rcirc-track-minor-mode 1)))
591@end example
592
84247bb5 593@node Hacking and Tweaking, GNU Free Documentation License, Reference, Top
97ed0ac3
EZ
594@chapter Hacking and Tweaking
595@cindex hacking and tweaking
596
597Here are some examples of stuff you can do to configure @code{rcirc}.
598
599@menu
62e77f3d
LT
600* Skipping /away messages using handlers::
601* Using fly spell mode::
602* Scrolling conservatively::
603* Changing the time stamp format::
604* Defining a new command::
605* Reconnecting after you have lost the connection::
97ed0ac3
EZ
606@end menu
607
608@node Skipping /away messages using handlers, Using fly spell mode, Hacking and Tweaking, Hacking and Tweaking
609@section Skipping @code{/away} messages using handlers
610@cindex /away messages
611
612@cindex handlers
613@cindex status codes
62e77f3d 614The IRC protocol specifies how certain events are signaled from server
97ed0ac3
EZ
615to client. These events have numbers and are dealt with using so-called
616handlers. You can override existing handlers by exploiting the naming
617convention adopted for @code{rcirc}.
618
619Here's how to stop @code{rcirc} from printing @code{/away} messages.
620Since @code{rcirc} doesn't define a 301 handler, you don't need to
621require @code{rcirc} before defining the handler:
622
623@example
624(defun rcirc-handler-301 (process cmd sender args)
625 "/away message handler.")
626@end example
627
628@node Using fly spell mode, Scrolling conservatively, Skipping /away messages using handlers, Hacking and Tweaking
629@section Using fly spell mode
630@cindex fly spell
631@cindex spelling
632@cindex spell-checking as you type
633@cindex automatic spelling
634@vindex rcirc-mode-hook
635
636The following code activates Fly Spell Mode
637for @code{rcirc} buffers:
638
639@example
640(add-hook 'rcirc-mode-hook (lambda ()
641 (flyspell-mode 1)))
642@end example
643
644@xref{Spelling, , Flyspell mode, emacs, The GNU Emacs Manual},
645for details.
646
647@node Scrolling conservatively, Changing the time stamp format, Using fly spell mode, Hacking and Tweaking
648@section Scrolling conservatively
649@cindex input line
650@cindex scrolling
651@vindex scroll-conservatively
652@vindex rcirc-mode-hook
653
654IRC buffers are constantly growing. If you want to see as much as
655possible at all times, you would want the prompt at the bottom of the
656window when possible. The following snippet uses a local value for
657@code{scroll-conservatively} to achieve this:
658
659@example
660(add-hook 'rcirc-mode-hook
661 (lambda ()
662 (set (make-local-variable 'scroll-conservatively)
663 8192)))
664@end example
665
fe5a02b3 666@xref{Scrolling, , Scrolling conservatively, emacs, The GNU Emacs
97ed0ac3
EZ
667Manual}, for details.
668
669@node Changing the time stamp format, Defining a new command, Scrolling conservatively, Hacking and Tweaking
670@section Changing the time stamp format
671@cindex time stamp
672@cindex date time
673@cindex format time stamp
674@vindex rcirc-time-format
675
676@code{rcirc-time-format} is the format used for the time stamp. Here's
677how to include the date in the time stamp:
678
679@example
680(setq rcirc-time-format "%Y-%m-%d %H:%M ")
681@end example
682
683@node Defining a new command, Reconnecting after you have lost the connection, Changing the time stamp format, Hacking and Tweaking
684@section Defining a new command
685@cindex defining commands
686@cindex commands, defining
687@cindex new commands, defining
688
689Here's a simple new command, @code{/sv}. With it, you can boast about
690your IRC client. It shows how you can use @code{defun-rcirc-command} to
691define new commands.
692
693We're waiting for the definition of this command until @code{rcirc} is loaded
694because @code{defun-rcirc-command} is not yet available, and without
695@code{rcirc} loaded, the command wouldn't do us much good anyway.
696
697@smallexample
698(eval-after-load 'rcirc
699 '(defun-rcirc-command sv (arg)
700 "Boast about rcirc."
701 (interactive "i")
702 (rcirc-send-message process target
703 (concat "I use " rcirc-id-string))))
704@end smallexample
705
706@node Reconnecting after you have lost the connection, , Defining a new command, Hacking and Tweaking
707@section Reconnecting after you have lost the connection
708@cindex reconnecting
709@cindex disconnecting servers, reconnecting
710
711If you're chatting from a laptop, then you might be familiar with this
712problem: When your laptop falls asleep and wakes up later, your IRC
713client doesn't realise that it has been disconnected. It takes several
714minutes until the client decides that the connection has in fact been
715lost. The simple solution is to use @kbd{M-x rcirc}. The problem is
716that this opens an @emph{additional} connection, so you'll have two
717copies of every channel buffer --- one dead and one live.
718
719The real answer, therefore, is a @code{/reconnect} command:
720
721@smallexample
722(eval-after-load 'rcirc
723 '(defun-rcirc-command reconnect (arg)
724 "Reconnect the server process."
725 (interactive "i")
726 (unless process
727 (error "There's no process for this target"))
728 (let* ((server (car (process-contact process)))
729 (port (process-contact process :service))
fe5a02b3 730 (nick (rcirc-nick process))
97ed0ac3
EZ
731 channels query-buffers)
732 (dolist (buf (buffer-list))
733 (with-current-buffer buf
fe5a02b3
AS
734 (when (eq process (rcirc-buffer-process))
735 (remove-hook 'change-major-mode-hook
736 'rcirc-change-major-mode-hook)
97ed0ac3
EZ
737 (if (rcirc-channel-p rcirc-target)
738 (setq channels (cons rcirc-target channels))
739 (setq query-buffers (cons buf query-buffers))))))
740 (delete-process process)
fe5a02b3
AS
741 (rcirc-connect server port nick
742 rcirc-default-user-name
743 rcirc-default-user-full-name
744 channels))))
97ed0ac3
EZ
745@end smallexample
746
84247bb5
CY
747@node GNU Free Documentation License, Key Index, Hacking and Tweaking, Top
748@appendix GNU Free Documentation License
749@include doclicense.texi
750
751
752@node Key Index, Variable Index, GNU Free Documentation License, Top
97ed0ac3
EZ
753@unnumbered Key Index
754@printindex ky
755
756@node Variable Index, Index, Key Index, Top
757@unnumbered Variable Index
758@printindex vr
759
760@node Index, , Variable Index, Top
761@unnumbered Index
762@printindex cp
763
764@bye
cd7070ad
MB
765
766@ignore
767 arch-tag: 2589e562-3843-4ffc-8c2f-477cbad57c01
768@end ignore