2 Irssi's hierarchy is something like this:
8 |____|___________|____|____|
10 GUI (gtk/gnome, qt/kde, text, none)
14 xxx IRC | COMMON ICQ yyy
15 |____|_____|_____|____|____|
22 |____|_____|_____|____|
29 (IRC, ICQ, xxx and yyy are chat protocols ..)
30 (sub1 and sub2 are submodules of IRC module, like DCC and flood protect)
33 Chat protocols and frontends are kept in separate modules. Common UI
34 and GUI modules also have the common parts which don't know anything
35 about the chat protocols. This should allow implementing modules to
36 whatever chat protocols and with whatever frontends easily.
40 Communication between different modules are done with "signals". They are
41 not related to UNIX signals in any way, you could more like think of them
42 as "events" - which might be a better name for them, but I don't really
43 want to change it anymore :)
45 So, you send signal with signal_emit() and it's sent to all modules that
46 have grabbed it by calling signal_add() in their init function. For
49 signal_emit("mysignal", 1, "hello");
51 Sends a "mysignal" function with one argument "hello" - before that, you
52 should have grabbed the signal somewhere else with:
54 static void sig_mysignal(const char *arg1)
56 /* arg1 contains "hello" */
59 signal_add("mysignal", (SIGNAL_FUNC) sig_mysignal);
61 There are three different signal_add() functions which you can use to
62 specify if you want to grab the signal first, "normally" or last. You can
63 also stop the signal from going any further.
65 Emitting signal with it's name creates a small overhead since it has to
66 look up the signal's numeric ID first, after which it looks up the signal
67 structure. This is done because if you call a signal _really_ often,
68 it's faster to find it with it's numeric ID instead of the string. You
69 can use signal_get_uniq_id() macro to convert the signal name into ID -
70 you'll have to do this only once! - and use signal_emit_id() to emit the
71 signal. Don't bother to do this unless your signal is sent (or could be
72 sent) several times in a second.
74 See src/core/signals.h for defination of the signal function, and
75 signals.txt for a list of signals.
80 CORE depends on this for command line parameter handling.
81 (distributed with irssi)
86 Irssi depends on this for reading and saving configuration.
87 (created by me for irssi)
92 Provides some functionality that all other modules can use:
94 - keeping list of settings
95 - keeping list of /commands
96 - keeping track of loaded modules
97 - networking functions (with nonblocking connects, IPv6 support)
98 - handles connecting to servers
99 - raw logging of server's input/output data
101 - fgets() like function line_split() without any maximum line limits
102 - command line parameter handling
103 - miscellaneous useful little functions
109 - knows basics about windows and window items (=channels, queries, ..)
110 - printtext() - parsing texts and feeding it for GUI to print.
115 - user interface (/commands) for CORE's functionality
120 - all the rest of the functionality needed for a working client.
127 - IRC specific /commands
128 - flood protecting commands sent to server
129 - creating IRC masks based on nick/address for bans, ignores, etc.
130 - keeps list of channels, nicks, channel modes, bans, etc.
131 - keeps list of servers, server settings, irc networks,
132 server reconnections and irc network splits
133 - redirection of commands' replies
135 - ctcp support and flood protection
136 - Handles ignoring people
140 - DCC chat, send and get
144 - detects private or channel flooding and sends "flood" signal
145 - automatic ignoring when flooding
154 - placing channels and queries in windows
156 - printing infomation of some events