]> jfr.im git - irc/rizon/znc.git/blob - main.h
Increase the version number to 0.072
[irc/rizon/znc.git] / main.h
1 /*
2 * Copyright (C) 2004-2009 See the AUTHORS file for details.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published
6 * by the Free Software Foundation.
7 */
8
9 #ifndef _MAIN_H
10 #define _MAIN_H
11
12 // The following defines are for #if comparison (preprocessor only likes ints)
13 #define VERSION_MAJOR 0
14 #define VERSION_MINOR 72
15 // This one is for display purpose
16 #define VERSION (VERSION_MAJOR + VERSION_MINOR / 1000.0)
17
18 // You can add -DVERSION_EXTRA="stuff" to your CXXFLAGS!
19 #ifndef VERSION_EXTRA
20 #define VERSION_EXTRA ""
21 #endif
22
23 #ifndef _MODDIR_
24 #define _MODDIR_ "/usr/lib/znc"
25 #endif
26
27 #ifndef _DATADIR_
28 #define _DATADIR_ "/usr/share/znc"
29 #endif
30
31 #ifdef _MODULES
32 #define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER) \
33 if (macUSER) { \
34 CGlobalModules& GMods = CZNC::Get().GetModules(); \
35 CModules& UMods = macUSER->GetModules(); \
36 CUser* pOldGUser = GMods.GetUser(); \
37 CClient* pOldGClient = GMods.GetClient(); \
38 CClient* pOldUClient = UMods.GetClient(); \
39 GMods.SetUser(macUSER); \
40 GMods.SetClient(macCLIENT); \
41 UMods.SetClient(macCLIENT); \
42 if (GMods.macFUNC || UMods.macFUNC) { \
43 GMods.SetUser(pOldGUser); \
44 GMods.SetClient(pOldGClient); \
45 UMods.SetClient(pOldUClient); \
46 macEXITER; \
47 } \
48 GMods.SetUser(pOldGUser); \
49 GMods.SetClient(pOldGClient); \
50 UMods.SetClient(pOldUClient); \
51 }
52 #else
53 #define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER)
54 #endif
55
56 #endif // !_MAIN_H