]>
jfr.im git - irc/rizon/znc.git/blob - main.h
2 * Copyright (C) 2004-2009 See the AUTHORS file for details.
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.
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)
18 // You can add -DVERSION_EXTRA="stuff" to your CXXFLAGS!
20 #define VERSION_EXTRA ""
24 #define _MODDIR_ "/usr/lib/znc"
28 #define _DATADIR_ "/usr/share/znc"
32 #define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER) \
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); \
48 GMods.SetUser(pOldGUser); \
49 GMods.SetClient(pOldGClient); \
50 UMods.SetClient(pOldUClient); \
53 #define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER)