diff --git a/docs/Makefile.am b/docs/Makefile.am index 8998ffb4..23d61648 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -3,6 +3,7 @@ man_MANS = \ doc_DATA = \ capsicum.txt \ + design.html \ design.txt \ formats.txt \ manual.txt \ diff --git a/docs/design.html b/docs/design.html new file mode 100644 index 00000000..4be231ee --- /dev/null +++ b/docs/design.html @@ -0,0 +1,166 @@ + +

Design

+ +

Irssi’s hierarchy is something like this:

+ +

+        sub1 sub2
+           \ /
+      xxx  IRC       COMMON ICQ  yyy
+       |    |           |    |    |
+       '----+-----:-----+----+----'
+                  |
+                 GUI (gtk/gnome, qt/kde, text, none)
+                  |
+        sub1 sub2 |
+           \ /    |
+      xxx  IRC    |  COMMON ICQ  yyy
+       '----+-----+-----+----+----'
+                  |
+              COMMON UI
+                  |
+        sub1 sub2 |
+           \ /    |
+      xxx  IRC    |    ICQ  yyy
+       |    |     |     |    |
+       '----+-----+-----+----'
+                  |
+                CORE
+                /
+       lib-config
+
+
+ +

(IRC, ICQ, xxx and yyy are chat protocols ..)

+ +

(sub1 and sub2 are submodules of IRC module, like DCC and flood protect)

+ +

Chat protocols and frontends are kept in separate modules. Common UI +and GUI modules also have the common parts which don’t know anything +about the chat protocols. This should allow implementing modules to +whatever chat protocols and with whatever frontends easily.

+ +

Signals

+ +

Communication between different modules are done with “signals”. They are +not related to UNIX signals in any way, you could more like think of them +as “events” - which might be a better name for them, but I don’t really +want to change it anymore :)

+ +

So, you send signal with signal_emit() and it’s sent to all modules that +have grabbed it by calling signal_add() in their init function. For +example:

+ +
signal_emit("mysignal", 1, "hello");
+
+ +

Sends a “mysignal” function with one argument “hello” - before that, you +should have grabbed the signal somewhere else with:

+ +
static void sig_mysignal(const char *arg1)
+{
+  /* arg1 contains "hello" */
+}
+
+signal_add("mysignal", (SIGNAL_FUNC) sig_mysignal);
+
+ +

There are three different signal_add() functions which you can use to +specify if you want to grab the signal first, “normally” or last. You can +also stop the signal from going any further.

+ +

Emitting signal with it’s name creates a small overhead since it has to +look up the signal’s numeric ID first, after which it looks up the signal +structure. This is done because if you call a signal really often, +it’s faster to find it with it’s numeric ID instead of the string. You +can use signal_get_uniq_id() macro to convert the signal name into ID - +you’ll have to do this only once! - and use signal_emit_id() to emit the +signal. Don’t bother to do this unless your signal is sent (or could be +sent) several times in a second.

+ +

See src/core/signals.h for definition of the signal function, and +signals.txt for a list of signals.

+ +

lib-config

+ +

Irssi depends on this for reading and saving configuration. +(created by me for irssi)

+ +

CORE module

+ +

Provides some functionality that all other modules can use:

+ + +

COMMON UI module

+ + + +

GUI modules

+ + + +

IRC module

+ + + +

IRC UI module

+ + \ No newline at end of file diff --git a/docs/startup-HOWTO.html b/docs/startup-HOWTO.html index 8cd7a010..36d8edbf 100644 --- a/docs/startup-HOWTO.html +++ b/docs/startup-HOWTO.html @@ -378,7 +378,7 @@ Ctrl-X - set the next server in list active
/SET autolog_level ALL -CRAP -CLIENTCRAP -CTCPS (this is the default)
 
-

By default irssi logs to ~/irclogs//.log. You can change this with

+

By default irssi logs to ~/irclogs/<servertag>/<target>.log. You can change this with

/SET autolog_path ~/irclogs/$tag/$0.log (this is the default)
 
diff --git a/docs/startup-HOWTO.txt b/docs/startup-HOWTO.txt index 88912ef3..ecfe7ad8 100644 --- a/docs/startup-HOWTO.txt +++ b/docs/startup-HOWTO.txt @@ -416,7 +416,8 @@ requests, etc). You can specify the logging level yourself with /SET autolog_level ALL -CRAP -CLIENTCRAP -CTCPS (this is the default) -By default irssi logs to ~/irclogs//.log. You can change this with +By default irssi logs to ~/irclogs//.log. You can change +this with /SET autolog_path ~/irclogs/$tag/$0.log (this is the default) diff --git a/utils/syncdocs.sh b/utils/syncdocs.sh index ed76bf85..bd92ffab 100755 --- a/utils/syncdocs.sh +++ b/utils/syncdocs.sh @@ -7,6 +7,7 @@ site=https://irssi.org faq=$site/documentation/faq/ howto=$site/documentation/startup/ +design=$site/documentation/design/ # remove everything until H1 and optionally 2 DIVs before the # FOOTER. May need to be adjusted as the source pages change @@ -84,6 +85,7 @@ download_it() { download_it "FAQ" "$faq" "$srcdir"/docs/faq.html download_it "Startup How-To" "$howto" "$srcdir"/docs/startup-HOWTO.html +download_it "Design" "$design" "$srcdir"/docs/design.html # .html -> .txt with lynx or elinks echo "Documentation: html -> txt..." @@ -100,3 +102,6 @@ cat "$srcdir"/docs/faq.html \ cat "$srcdir"/docs/startup-HOWTO.html \ | perl -pe "s/\\bhref=([\"\'])#.*?\\1//" \ | LC_ALL=en_IE.utf8 $converter > "$srcdir"/docs/startup-HOWTO.txt + +cat "$srcdir"/docs/design.html \ + | LC_ALL=en_IE.utf8 $converter > "$srcdir"/docs/design.txt