3 This document is for Riece developers. The information necessary for
4 Riece development is explained (i.e. its development process and the
11 You can create a template of a bug report by clicking the "bug" button
12 in a toolbar, or M-x riece-submit-bug-report. It is necessary to set
13 riece-debug to t before preparing a bug report.
17 If the riece-debug variable is set to t, Riece begins to collect
18 debugging information in *Debug* buffer. Interactions with IRC
19 servers are stored in " *IRC*<IRC-server-name>" buffers. Note that
20 these buffer names start with a whitespace character (" ").
22 ** Joining the development
24 To join the development, send us a patch or an add-on.
28 Development of Riece uses CVS. Latest developing version is available
29 at CVS. Please note that the newest development version from CVS may
30 NOT be reliable. You can only use it at your own risk. We may ignore
31 bug reports for that version. The instruction to access the CVS
34 (1) logging in to anonymous CVS server
36 cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
37 CVS password: [CR] # NULL string
41 cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout riece
43 (3) generate configure script
47 You will need newer version of GNU Automake.
53 Riece consists of many elisp modules listed below, ordered by the
54 number of dependencies they have.
57 This module defines global variables.
60 This module defines user options.
63 This module defines the version of Riece.
66 This module provides functions which support character code conversions.
69 This module provides functions which support tab completion feature
73 This module manages add-ons.
76 This module manages modes of riece-channel/riece-user objects.
79 This module defines the riece-identity object type which represents
80 global names of riece-channel/riece-user objects.
83 This module defines the riece-channel object type.
86 This module defines the riece-user object type.
89 This module provides miscellaneous functions.
92 This module defines the riece-signal object type used to manage
96 This module manages window layouts.
99 This module manages display events.
102 This module manages connections to IRC servers.
105 This module is a so called the Mediator design pattern. It knows
106 relationships of riece-channel/riece-user objects.
109 This module defines the riece-message object type.
112 This module only provides the process filter function.
115 This module provides handler functions for IRC messages. These
116 functions are called from riece-filter.
119 This module provides handler functions for numeric replies whose
120 response codes are in 000 to 100 range. These handlers are called
124 This module provides handler functions for numeric replies whose
125 response codes are in 200 to 300 range. These handlers are called
129 This module provides handler functions for numeric replies whose
130 response codes are in 300 to 400 range. These handlers are called
134 This module provides handler functions for numeric replies whose
135 response codes are in 400 to 500 range. These handlers are called
139 This module provides handler functions for numeric replies whose
140 response codes are in 500 to 600 range. These handlers are called
144 This module provides user commands.
147 This module provides the binding for the IRC protocol.
150 This module is the entry point of M-x riece.
152 ** Namespace management
154 Riece is capable to connect to several IRC servers.
156 Riece has separate namespace (obarray) for each connection. These
157 namespaces can be accessed as buffer local variables of process
160 *** Obtaining server buffer
162 To access to the buffer local variables of process buffer, it is
163 needed to distinguish process object of each connection by its name.
167 (1) checking the value of riece-overrinding-server-name,
169 (2) checking the value of riece-server-name,
170 (If the variable riece-server-name is local to the current buffer,
171 you are already in the process buffer.)
173 (3) or parsing riece-identity objects
175 Once you get the name of the IRC server, you can get the process
176 object by passing the name to the function riece-server-process.
178 *** riece-identity objects
180 A riece-identity object represents a name of a channel/user. It is
181 used to distinguish a channel/user among several servers.
183 A riece-identity object is actually a vector, which consists of two
184 elements listed below.
187 A channel/user name local to an IRC server.
190 The name of the IRC server.
192 Methods to manipulate riece-identity object are listed below.
194 - riece-make-identity prefix &optional server
195 Create a new riece-identity object. If the server argument is
196 omitted, it sets the server part to the value returned by the
197 riece-find-server-name function.
199 - riece-identity-prefix identity
200 Return the prefix element from the given riece-identity object.
202 - riece-identity-server identity
203 Return the server element from the given riece-identity object.
205 - riece-identity-equal ident1 ident2
206 Return t, if two riece-identity objects are equal.
208 - riece-identity-equal-no-server ident1 ident2
209 Return t, if two riece-identity objects are equal. This function
210 only consider a prefix part of a riece-identity object.
212 - riece-identity-member elt list
213 Return non-nil if a riece-identity object is an element of a list.
215 *** Channels and users
217 A riece-channel object provides an abstraction of a channel.
218 Likewise, a riece-user object provides an abstraction of a user.
220 **** riece-channel objects
222 A riece-channel object has many information about a channel. A
223 riece-channel object is actually a vector whose seven elements are listed
227 A list of nicknames which are of users in this channel.
230 A list of nicknames which are of channel operators in this channel.
233 A list of nicknames which are of users who have the right to speak
237 An alist which represents modes of this channel.
240 A list of patterns set by MODE +b.
243 A list of patterns set by MODE +I.
246 A list of patterns set by MODE +e.
248 **** riece-user objects
250 A riece-user object has many information about a user. A riece-user
251 object is actually a vector whose four elements are listed below.
254 A list of channel names this user is participating.
257 Connection information of this user, set in "<user>@<host>" format.
260 An alist which represents modes of this user.
263 A flag represent whether this user is AWAY.
265 **** The Mediator pattern
267 The riece-naming module is used to manage relationships between
268 channels and users. It utilizes the Mediator design pattern.
270 Using the riece-naming module allows to safely access to the namespace
271 rather than directly connects riece-channel/riece-user objects.
273 The riece-naming module provides the following functions.
275 - riece-naming-assert-join user-name channel-name
276 Assert that a user is a member of a channel.
278 - riece-naming-assert-part user-name channel-name
279 Assert that a user is no longer a member of a channel.
281 - riece-naming-assert-rename old-name new-name
282 Assert that a user changed his nickname.
286 There is a mechanism to connect events and display objects (windows,
287 buffers, and modeline indicators). This is done by signals.
289 When it is needed to redraw, a signal is emitted. The concept of
290 signals is corresponding to signals in generic window system toolkit
293 To emit a signal, use riece-emit-signal.
295 - riece-emit-signal signal-name &rest args
296 Emit a signal named signal-name with args.
298 To define a function called when a signal is emitted, use
299 riece-connect-signal.
301 - riece-connect-signal signal-name slot-function &optional
302 filter-function handback
304 Give a signal a slot-function. The slot-function gets two
305 arguments: the signal object itself and a handback object given as
306 the fourth argument of riece-connect-signal.
308 If the third argument filter-function is specified, the
309 slot-function is called conditionaly. The filter-function gets the
310 signal object and returns nil or t. If the return value is nil, the
311 slot-function is not called.
313 To access to a signal object, use the following functions.
315 - riece-signal-name signal
316 Return the name of a signal.
319 Return the data of a signal.
321 Below is a list of signal names reserved.
323 - channel-list-changed
324 Need update the channel list.
327 Need update the user list.
328 (This signal gets a riece-identity object as an argument which
329 represents the channel.)
332 A user selected another channel.
334 - user-joined-channel
335 A user joined a channel.
336 (This signal gets two riece-identity objects as arguments
337 corresponding to the user and the channel respectively.)
340 A user left a channel.
341 (This signal gets two riece-identity objects as arguments
342 corresponding to the user and the channel respectively.)
345 A user changed his nickname.
346 (This signal gets two riece-identity objects as arguments
347 corresponding to the old and the new nickname respectively.)
350 A user changed his AWAY status.
351 (This signal gets a riece-identity object as an argument which
352 represents the user.)
354 - user-operator-changed
355 A user changed his IRC operator status.
356 (This signal gets a riece-identity object as an argument which
357 represents the user.)
359 - channel-topic-changed
360 A topic of a channel changed.
361 (This signal gets a riece-identity object as an argument which
362 represents the channel.)
364 - channel-modes-changed
365 Modes of a channel changed.
366 (This signal gets a riece-identity object as an argument which
367 represents the channel.)
369 - channel-operators-changed
370 A list of operators in a channel changed.
371 (This signal gets a riece-identity object as an argument which
372 represents the channel.)
374 - channel-speakers-changed
375 A list of users who have the right to speak in a channel changed.
376 (This signal gets a riece-identity object as an argument which
377 represents the channel.)
379 - buffer-freeze-changed
380 A buffer is frozen or unfrozen.
381 (This signal gets a buffer as an argument.)
385 Elisp modules that satisfy add-on spec should provide the following
388 - <module-name>-requires
389 Return a list of names of other add-ons this add-on depends. (optional)
391 - <module-name>-insinuate
392 Called on initialization of this module.
394 It is recommended to set short explanation of the add-on to
395 <module-name>-description variable which is displayed on add-on
396 listing shown up by C-c ^ (M-x riece-command-list-addons).
398 Add-ons that support enabling/disabling set the current status to
399 <module-name>-enabled variable. If this variable is nil, the add-on
400 is regarded as currently disabled. In addition, the add-on must
401 provide the following two functions.
403 - <module-name>-enable
404 Called to enable this add-on.
406 - <module-name>-disable
407 Called to disable this add-on.
409 Riece does the following process when startup.
411 (1) Load add-ons listed in the riece-addons variable.
413 (2) Call <module-name>-requires on each add-on (if exists) and build a
416 (3) Sort the dependency graph.
418 (4) Call <module-name>-insinuate on each add-on in order of the
421 (5) Call <module-name>-enable on each add-on, iff it supports
422 enabling/disabling and is not disabled explicitly.
424 Add-ons are loaded from directories listed in load-path, or from
429 There are hooks called "handler hooks " which have special meaning in
430 Riece. Handler hooks are called before/after processing IRC messages.
432 - riece-<message>-hook
433 Called before processing an IRC message.
435 - riece-after-<message>-hook
436 Called after processing an IRC message.
438 Where <message> is a type of IRC message and consists only lowercase
441 If riece-<message>-hook returns non-nil, <message> is not processed.
442 In this case riece-after-<message>-hook is not called.
444 Handler hooks gets two arguments corresponding to prefix and
445 parameters in RFC2812.