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 definition of the signal function, and
75 signals.txt for a list of signals.
80 Irssi depends on this for reading and saving configuration.
81 (created by me for irssi)
86 Provides some functionality that all other modules can use:
88 - keeping list of settings
89 - keeping list of /commands
90 - keeping track of loaded modules
91 - networking functions (with nonblocking connects, IPv6 support)
92 - handles connecting to servers
93 - raw logging of server's input/output data
95 - fgets() like function line_split() without any maximum line limits
96 - command line parameter handling
97 - miscellaneous useful little functions
103 - knows basics about windows and window items (=channels, queries, ..)
104 - printtext() - parsing texts and feeding it for GUI to print.
109 - user interface (/commands) for CORE's functionality
114 - all the rest of the functionality needed for a working client.
121 - IRC specific /commands
122 - flood protecting commands sent to server
123 - creating IRC masks based on nick/address for bans, ignores, etc.
124 - keeps list of channels, nicks, channel modes, bans, etc.
125 - keeps list of servers, server settings, irc networks,
126 server reconnections and irc network splits
127 - redirection of commands' replies
129 - ctcp support and flood protection
130 - Handles ignoring people
134 - DCC chat, send and get
138 - detects private or channel flooding and sends "flood" signal
139 - automatic ignoring when flooding
148 - placing channels and queries in windows
150 - printing infomation of some events