Files
znc/main.h
psychon b772e2664e Merged rev 838,888,890,894,899,900,902-904,926,934,963,984-989 from crox's branch:
- Changes to specfile
- define PATH_MAX and RTLD_LOCAL if not defines
- compile fixes
- SetFileName should not set m_iFD
- check for cygwin and do not use -fPIC
- replaced if ... elif with case in configure.in
- handle 437 reply code
- allow disabled channels
- use strerror() in CIRCSock::SockError()
- added GetUser() to CClient and CIRCSock
- added support for traffic accounting
- added names to timers


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@806 726aef4b-f618-498e-8847-2d620e286838
2007-05-17 19:09:17 +00:00

59 lines
1.2 KiB
C++

//! @author prozac@rottenboy.com
#ifndef _MAIN_H
#define _MAIN_H
// Keep the number in sync with configure.in (and also with configure)
#define VERSION 0.048
#ifndef _MODDIR_
#define _MODDIR_ "/usr/libexec/znc"
#endif
#ifdef _MODULES
#define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER) \
if (macUSER) { \
CGlobalModules& GMods = CZNC::Get().GetModules(); \
CModules& UMods = macUSER->GetModules(); \
GMods.SetUser(macUSER); GMods.SetClient(macCLIENT); \
UMods.SetClient(macCLIENT); \
if (GMods.macFUNC || UMods.macFUNC) { \
GMods.SetUser(NULL); GMods.SetClient(NULL); \
UMods.SetClient(NULL); \
macEXITER; \
} \
GMods.SetUser(NULL); GMods.SetClient(NULL); \
UMods.SetClient(NULL); \
}
#else
#define MODULECALL(macFUNC, macUSER, macCLIENT, macEXITER)
#endif
#ifndef CS_STRING
#define CS_STRING CString
#endif
#ifndef _NO_CSOCKET_NS
#define _NO_CSOCKET_NS
#endif
#ifdef _DEBUG
#define __DEBUG__
#endif
#include <iostream>
using std::cout;
using std::cerr;
using std::endl;
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
#include "String.h"
#include "Csocket.h"
#include "Utils.h"
#endif // !_MAIN_H