summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-03 22:08:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-03 22:08:00 +0000
commita98e7a8023fdaa367c4e712ea753a0d8dd9fbb04 (patch)
tree42911c265481e34fd3bd6fba928dff425e07cde0 /src/modules
parent327d002150dd57c05bbaa2dbcd6bc42d2497326d (diff)
Allow for the cgiirc module to change the users host if it doesnt resolve
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6622 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cgiirc.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 7f39ec1f8..f7dd03d8d 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -296,7 +296,7 @@ public:
strlcpy(user->host, user->password, 64);
strlcpy(user->dhost, user->password, 64);
user->InvalidateCache();
-
+
bool valid = false;
#ifdef IPV6
if (user->GetProtocolFamily() == AF_INET6)
@@ -318,6 +318,7 @@ public:
/* We got as resolved hostname in the password. */
try
{
+
bool cached;
CGIResolver* r = new CGIResolver(this, ServerInstance, NotifyOpers, user->password, false, user, user->GetFd(), "PASS", cached);
ServerInstance->AddResolver(r, cached);
@@ -370,10 +371,13 @@ public:
#else
inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
#endif
-
-
+
try
{
+ strlcpy(user->host, newip, 16);
+ strlcpy(user->dhost, newip, 16);
+ strlcpy(user->ident, "~cgiirc", 8);
+
bool cached;
CGIResolver* r = new CGIResolver(this, ServerInstance, NotifyOpers, newip, false, user, user->GetFd(), "IDENT", cached);
ServerInstance->AddResolver(r, cached);