About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Go to the documentation of this file.
1// Module initialization hub
3// Copyright (c) 1987-2022 by the team
5// This program is open source software. Use, duplication, or disclosure
6// is subject to the terms of the GNU General Public License, version 3.
7// The program is distributed without any warranty, expressed or implied.
9// To add new modules to the server:
10// 1. Write the module and place it in a server/modules/[module_name]/ directory
11// 2. Add its initialization function to server/modules_init.h
12// 3. Call its initialization function from server/modules_init.c
14#include <stdlib.h>
15#include <unistd.h>
16#include <syslog.h>
17#include <stdio.h>
18#include "modules_init.h"
20// Module initialization functions will be called TWICE during startup, once before
21// the server has gone into multithreading mode, and once afterwards. Most modules
22// can be initialized while in multithreading mode, but your module code should be
23// prepared for this kind of initialization. Look at the existing modules to see what
24// goes on there.
25int threading = 0;
27void initialize_modules(int is_threading) {
28 threading = is_threading;
29 syslog(LOG_DEBUG, "extensions: begin initializing modules (threading=%d)", threading);
30 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_control());
31 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_euidindex());
32 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_msgbase());
33 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_database());
34 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_autocompletion());
35 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_bio());
36 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_blog());
37 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_calendar());
38 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_checkpoint());
39 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_virus());
40 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_file_ops());
41 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_ctdl_message());
42 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_rooms());
43 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_serv_session());
44 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_syscmd());
45 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_serv_user());
46 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_expire());
47 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_fulltext());
48 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_image());
49 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_imap());
50 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_sieve());
51 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_inetcfg());
52 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_instmsg());
53 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_listdeliver());
54 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_listsub());
55 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_migrate());
56 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_newuser());
57 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_nntp());
58 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_notes());
59 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_openid_rp());
60 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_pop3());
61 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_pop3client());
62 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_roomchat());
63 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_rssclient());
64 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_rwho());
65 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_smtp());
66 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_smtpclient());
67 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_spam());
68 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_test());
69 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_upgrade());
70 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_vcard());
71 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_wiki());
72 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_xmpp());
73 syslog(LOG_DEBUG, "extensions: init %s", ctdl_module_init_netconfig());
74 syslog(LOG_DEBUG, "extensions: finished initializing modules (threading=%d)", threading);
char * ctdl_module_init_control(void)
Definition: control.c:796
char * ctdl_module_init_database()
Definition: database.c:800
char * ctdl_module_init_euidindex(void)
Definition: euidindex.c:202
int threading
Definition: modules_init.c:25
void initialize_modules(int is_threading)
Definition: modules_init.c:27
char * ctdl_module_init_msgbase(void)
Definition: msgbase.c:3552
char * ctdl_module_init_netconfig(void)
Definition: netconfig.c:181
char * ctdl_module_init_test(void)
char * ctdl_module_init_autocompletion(void)
char * ctdl_module_init_bio(void)
Definition: serv_bio.c:198
char * ctdl_module_init_blog(void)
Definition: serv_blog.c:73
char * ctdl_module_init_calendar(void)
char * ctdl_module_init_checkpoint(void)
char * ctdl_module_init_expire(void)
Definition: serv_expire.c:820
char * ctdl_module_init_file_ops(void)
Definition: serv_file.c:664
char * ctdl_module_init_fulltext(void)
char * ctdl_module_init_image(void)
Definition: serv_image.c:343
char * ctdl_module_init_imap(void)
Definition: serv_imap.c:1588
char * ctdl_module_init_sieve(void)
char * ctdl_module_init_inetcfg(void)
Definition: serv_inetcfg.c:126
char * ctdl_module_init_instmsg(void)
Definition: serv_instmsg.c:572
char * ctdl_module_init_listdeliver(void)
char * ctdl_module_init_listsub(void)
Definition: serv_listsub.c:295
char * ctdl_module_init_ctdl_message(void)
char * ctdl_module_init_migrate()
char * ctdl_module_init_newuser(void)
Definition: serv_newuser.c:85
char * ctdl_module_init_nntp(void)
Definition: serv_nntp.c:1147
char * ctdl_module_init_notes(void)
Definition: serv_notes.c:149
char * ctdl_module_init_openid_rp(void)
char * ctdl_module_init_pop3(void)
Definition: serv_pop3.c:577
char * ctdl_module_init_pop3client(void)
char * ctdl_module_init_roomchat(void)
char * ctdl_module_init_rooms(void)
Definition: serv_rooms.c:1020
char * ctdl_module_init_rssclient(void)
char * ctdl_module_init_rwho(void)
Definition: serv_rwho.c:181
char * ctdl_module_init_serv_session(void)
Definition: serv_session.c:212
char * ctdl_module_init_smtp(void)
Definition: serv_smtp.c:1022
char * ctdl_module_init_smtpclient(void)
char * ctdl_module_init_spam(void)
Definition: serv_spam.c:174
char * ctdl_module_init_syscmd(void)
Definition: serv_syscmds.c:75
char * ctdl_module_init_upgrade(void)
Definition: serv_upgrade.c:570
char * ctdl_module_init_serv_user(void)
Definition: serv_user.c:778
char * ctdl_module_init_vcard(void)
Definition: serv_vcard.c:1213
char * ctdl_module_init_virus(void)
Definition: serv_virus.c:172
char * ctdl_module_init_wiki()
Definition: serv_wiki.c:716
char * ctdl_module_init_xmpp()
Definition: serv_xmpp.c:657