]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/message.cpp
Advanced to RC1
[user/henk/code/inspircd.git] / src / message.cpp
index 8adf507938f488ac03eb68300731e5010d9d1ca6..de6e012ac15fca3bbace1d2229af91aeff4b29cd 100644 (file)
@@ -19,7 +19,6 @@ using namespace std;
 #include "inspircd_config.h"
 #include "inspircd.h"
 #include "inspircd_io.h"
-#include "inspircd_util.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/errno.h>
@@ -50,13 +49,8 @@ using namespace std;
 extern int MODCOUNT;
 extern std::vector<Module*> modules;
 extern std::vector<ircd_module*> factory;
-
-extern char ServerName[MAXBUF];
-
 extern time_t TIME;
-
-extern FILE *log_file;
-extern char DNSServer[MAXBUF];
+extern ServerConfig* Config;
 
 /* return 0 or 1 depending if users u and u2 share one or more common channels
  * (used by QUIT, NICK etc which arent channel specific notices) */
@@ -104,7 +98,7 @@ void tidystring(char* str)
        while (go_again)
        {
                bool noparse = false;
-               unsigned int t = 0, a = 0;
+               int t = 0, a = 0;
                go_again = false;
                const int lenofstr = strlen(str);
 
@@ -183,9 +177,9 @@ void NonBlocking(int s)
 
 int CleanAndResolve (char *resolvedHost, const char *unresolvedHost)
 {
-       DNS d(DNSServer);
+       DNS d(Config->DNSServer);
        int fd = d.ReverseLookup(unresolvedHost);
-       if (fd < 1)
+       if (fd < 0)
                return 0;
        time_t T = time(NULL)+1;
        while ((!d.HasResult()) && (time(NULL)<T));