summaryrefslogtreecommitdiff
path: root/src/dynamic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dynamic.cpp')
-rw-r--r--src/dynamic.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dynamic.cpp b/src/dynamic.cpp
index e96c9d905..06aaf3ccd 100644
--- a/src/dynamic.cpp
+++ b/src/dynamic.cpp
@@ -17,6 +17,7 @@
using namespace std;
#include "inspircd_config.h"
+#include "inspircd_io.h"
#include "globals.h"
#include "dynamic.h"
@@ -32,6 +33,8 @@ using namespace std;
#include <sys/types.h>
#include <stdio.h>
+extern ServerConfig* Config;
+
DLLManager::DLLManager(char *fname)
{
#ifdef STATIC_LINK
@@ -72,7 +75,8 @@ DLLManager::DLLManager(char *fname)
err = (char*)dlerror();
close(fd);
// We can delete the tempfile once it's loaded, leaving just the inode.
- unlink(tmpfile_template);
+ if (!Config->debugging)
+ unlink(tmpfile_template);
#endif
}