imported.
[silc.git] / apps / irssi / src / core / core.c
1 /*
2  core.c : irssi
3
4     Copyright (C) 1999-2000 Timo Sirainen
5
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #include "module.h"
22
23 #include "pidwait.h"
24
25 #include "net-disconnect.h"
26 #include "net-sendbuffer.h"
27 #include "signals.h"
28 #include "settings.h"
29
30 #include "chat-protocols.h"
31 #include "servers.h"
32 #include "chatnets.h"
33 #include "commands.h"
34 #include "expandos.h"
35 #include "write-buffer.h"
36 #include "log.h"
37 #include "rawlog.h"
38 #include "ignore.h"
39
40 #include "channels.h"
41 #include "queries.h"
42 #include "nicklist.h"
43 #include "nickmatch-cache.h"
44
45 void chat_commands_init(void);
46 void chat_commands_deinit(void);
47
48 int irssi_gui;
49
50 void core_init(void)
51 {
52         modules_init();
53 #ifndef WIN32
54         pidwait_init();
55 #endif
56
57         net_disconnect_init();
58         net_sendbuffer_init();
59         signals_init();
60         settings_init();
61         commands_init();
62         nickmatch_cache_init();
63
64         chat_protocols_init();
65         chatnets_init();
66         expandos_init();
67         ignore_init();
68         servers_init();
69         write_buffer_init();
70         log_init();
71         rawlog_init();
72
73         channels_init();
74         queries_init();
75         nicklist_init();
76
77         chat_commands_init();
78         settings_check();
79 }
80
81 void core_deinit(void)
82 {
83         chat_commands_deinit();
84
85         nicklist_deinit();
86         queries_deinit();
87         channels_deinit();
88
89         rawlog_deinit();
90         log_deinit();
91         write_buffer_deinit();
92         servers_deinit();
93         ignore_deinit();
94         expandos_deinit();
95         chatnets_deinit();
96         chat_protocols_deinit();
97
98         nickmatch_cache_deinit();
99         commands_deinit();
100         settings_deinit();
101         signals_deinit();
102         net_sendbuffer_deinit();
103         net_disconnect_deinit();
104
105 #ifndef WIN32
106         pidwait_deinit();
107 #endif
108         modules_deinit();
109 }