summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/helperfuncs.h2
-rw-r--r--include/inspircd.h4
-rw-r--r--include/u_listmode.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/include/helperfuncs.h b/include/helperfuncs.h
index e094b1a0e..e5b563051 100644
--- a/include/helperfuncs.h
+++ b/include/helperfuncs.h
@@ -43,7 +43,7 @@
*/
#define STRINGIFY2(x) #x
#define STRINGIFY(x) STRINGIFY2(x)
-#define log(l, x, args...) do_log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args)
+#define log(l, x, args...) InspIRCd::Log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args)
void do_log(int level, const char *text, ...);
void readfile(file_cache &F, const char* fname);
diff --git a/include/inspircd.h b/include/inspircd.h
index 0b2a2830d..91d57f75d 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -43,7 +43,7 @@
*/
#define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) )
-#define DELETE(x) { do_log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); if (x) { delete x; x = NULL; } else log(DEBUG,"Attempt to delete NULL pointer!"); }
+#define DELETE(x) { InspIRCd::Log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); if (x) { delete x; x = NULL; } else InspIRCd::Log(DEBUG,"Attempt to delete NULL pointer!"); }
template<typename T> inline std::string ConvToStr(const T &in)
{
@@ -114,6 +114,8 @@ class InspIRCd : public classbase
bool UnloadModule(const char* filename);
InspIRCd(int argc, char** argv);
void DoOneIteration(bool process_module_sockets);
+ static void Log(int level, const char* text, ...);
+ static void Log(int level, const std::string &text);
int Run();
};
diff --git a/include/u_listmode.h b/include/u_listmode.h
index b3958caa2..45b04c158 100644
--- a/include/u_listmode.h
+++ b/include/u_listmode.h
@@ -9,6 +9,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for easily creating listmodes, stores the time set, the user, and a parameter. */