Mercurial > hg
comparison mcabber/src/main.c @ 113:8ac67e951eab
[/trunk] Changeset 127 by mikael
* Add a "hooks" layer.
Hooks are used when multiples operations should be done when an event
araises. For example message in/out, status change...
2 more files; Makefile updated.
* Logging is ready.
* Add 2 options:
- "logging" (bool): enable/disable history logging
- "logging_dir" (char): root dir for logging files
* Document pinginterval (keepalive) in the sample config file.
* Send keepalive only when online.
author | mikael |
---|---|
date | Sun, 24 Apr 2005 20:24:18 +0000 |
parents | edb5591e2e64 |
children | cfd3df636d5f |
comparison
equal
deleted
inserted
replaced
112:edb5591e2e64 | 113:8ac67e951eab |
---|---|
9 #include "jabglue.h" | 9 #include "jabglue.h" |
10 #include "screen.h" | 10 #include "screen.h" |
11 #include "parsecfg.h" | 11 #include "parsecfg.h" |
12 #include "roster.h" | 12 #include "roster.h" |
13 #include "commands.h" | 13 #include "commands.h" |
14 #include "histolog.h" | |
14 #include "lang.h" | 15 #include "lang.h" |
15 #include "utils.h" | 16 #include "utils.h" |
16 #include "harddefines.h" | 17 #include "harddefines.h" |
17 | 18 |
18 | 19 |
147 scr_InitCurses(); | 148 scr_InitCurses(); |
148 | 149 |
149 ut_WriteLog("Drawing main window...\n"); | 150 ut_WriteLog("Drawing main window...\n"); |
150 scr_DrawMainWindow(); | 151 scr_DrawMainWindow(); |
151 | 152 |
153 optstring = cfg_read("logging"); | |
154 if (optstring && (atoi(optstring) > 0)) | |
155 hlog_enable(TRUE, cfg_read("logging_dir")); | |
156 | |
152 ssl = 0; | 157 ssl = 0; |
153 optstring = cfg_read("ssl"); | 158 optstring = cfg_read("ssl"); |
154 if (optstring && (atoi(optstring) > 0)) | 159 if (optstring && (atoi(optstring) > 0)) |
155 ssl = 1; | 160 ssl = 1; |
156 portstring = cfg_read("port"); | 161 portstring = cfg_read("port"); |