rcirc.texi 29 KB

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