summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/helperfuncs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 05f2d79c3..2398e6668 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -32,6 +32,10 @@ static time_t LAST = 0;
*/
void InspIRCd::Log(int level, const char* text, ...)
{
+ /* Do this check again here so that we save pointless vsnprintf calls */
+ if ((level < Config->LogLevel) && !Config->forcedebug)
+ return;
+
va_list argsPtr;
char textbuffer[65536];