2005-05-15 04:21:31 +00:00
|
|
|
/* +------------------------------------+
|
|
|
|
* | Inspire Internet Relay Chat Daemon |
|
|
|
|
* +------------------------------------+
|
|
|
|
*
|
2006-01-15 15:59:11 +00:00
|
|
|
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
|
2005-05-15 04:21:31 +00:00
|
|
|
* E-mail:
|
|
|
|
* <brain@chatspike.net>
|
|
|
|
* <Craig@chatspike.net>
|
|
|
|
*
|
|
|
|
* Written by Craig Edwards, Craig McLure, and others.
|
|
|
|
* This program is free but copyrighted software; see
|
|
|
|
* the file COPYING for details.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2005-05-15 03:03:23 +00:00
|
|
|
#ifndef _HELPER_H_
|
|
|
|
#define _HELPER_H_
|
|
|
|
|
|
|
|
#include "dynamic.h"
|
|
|
|
#include "base.h"
|
|
|
|
#include "ctables.h"
|
|
|
|
#include "users.h"
|
|
|
|
#include "channels.h"
|
2005-12-16 12:00:52 +00:00
|
|
|
#include "typedefs.h"
|
2005-05-15 03:03:23 +00:00
|
|
|
#include <string>
|
|
|
|
#include <deque>
|
|
|
|
#include <sstream>
|
|
|
|
|
2006-08-09 14:20:04 +00:00
|
|
|
/** Debug levels for use with InspIRCd::Log()
|
2006-04-08 17:05:48 +00:00
|
|
|
*/
|
2006-08-09 14:20:04 +00:00
|
|
|
enum DebugLevel
|
|
|
|
{
|
|
|
|
DEBUG = 10,
|
|
|
|
VERBOSE = 20,
|
|
|
|
DEFAULT = 30,
|
|
|
|
SPARSE = 40,
|
|
|
|
NONE = 50,
|
|
|
|
};
|
2006-04-08 17:05:48 +00:00
|
|
|
|
2006-06-29 08:30:25 +00:00
|
|
|
/* I'm not entirely happy with this, the ## before 'args' is a g++ extension.
|
|
|
|
* The problem is that if you #define log(l, x, args...) and then call it
|
|
|
|
* with only two parameters, you get do_log(l, x, ), which is a syntax error...
|
|
|
|
* The ## tells g++ to remove the trailing comma...
|
|
|
|
* If this is ever an issue, we can just have an #ifndef GCC then #define log(a...) do_log(a)
|
|
|
|
*/
|
|
|
|
#define STRINGIFY2(x) #x
|
|
|
|
#define STRINGIFY(x) STRINGIFY2(x)
|
2006-08-09 13:19:41 +00:00
|
|
|
#define log(l, x, args...) InspIRCd::Log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args)
|
2006-06-29 08:30:25 +00:00
|
|
|
|
2005-05-15 03:03:23 +00:00
|
|
|
#endif
|