summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-01 23:26:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-01 23:26:11 +0000
commite00b5b82db1fdffd97704ea1b43bf921476adfa1 (patch)
tree3dd07f3b2d5795b13518579ec87748c3d74023d2 /src/users.cpp
parentf44d25e8c3c5cad78c71c3a5e5d3016f241c4c79 (diff)
Comments, add more detail, remove dnsqueue.h include from tons of places
Remove THREADED_DNS defines from all over the place git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4629 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/users.cpp b/src/users.cpp
index dcc33b22c..8e466592e 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -21,10 +21,6 @@
#include "users.h"
#include "inspircd.h"
#include <stdio.h>
-#ifdef THREADED_DNS
-#include <pthread.h>
-#include <signal.h>
-#endif
#include "inspstring.h"
#include "commands.h"
#include "helperfuncs.h"
@@ -165,13 +161,21 @@ void UserResolver::OnLookupComplete(const std::string &result)
if (insp_ntoa(this->bound_user->ip4) == result)
{
std::string hostname = this->bound_user->stored_host;
- if (hostname.length() < 64)
+ if (hostname.length() < 65)
{
- WriteServ(this->bound_fd, "*** Found your hostname (%s)", this->bound_user->stored_host.c_str());
+ WriteServ(this->bound_fd, "NOTICE Auth :*** Found your hostname (%s)", this->bound_user->stored_host.c_str());
this->bound_user->dns_done = true;
strlcpy(this->bound_user->dhost, hostname.c_str(),64);
strlcpy(this->bound_user->host, hostname.c_str(),64);
}
+ else
+ {
+ WriteServ(this->bound_fd, "NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", insp_ntoa(this->bound_user->ip4));
+ }
+ }
+ else
+ {
+ WriteServ(this->bound_fd, "NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", insp_ntoa(this->bound_user->ip4));
}
}
}
@@ -270,12 +274,6 @@ userrec::~userrec()
ucrec* x = (ucrec*)*n;
delete x;
}
-#ifdef THREADED_DNS
- if ((IS_LOCAL(this)) && (!dns_done) && (registered >= REG_NICKUSER))
- {
- pthread_kill(this->dnsthread, SIGTERM);
- }
-#endif
}
/* XXX - minor point, other *Host functions return a char *, this one creates it. Might be nice to be consistant? */