diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-12 14:16:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-12 14:16:31 +0000 |
commit | 7984f41072c8dde6135f71b0589822d45d494b92 (patch) | |
tree | 518355a60a324b2ec66cbbaaebc5132420ea6ac9 | |
parent | d4efb7d2daefb37a792d51f5f783d6fbac48e86c (diff) |
Seems to work ok
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4365 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_cgiirc.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 0ff2ecf4c..4aa39dab0 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -66,12 +66,21 @@ class CGIResolver : public Resolver if (notify) WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick, them->host, result.c_str(), typ.c_str()); - strlcpy(them->host, result.c_str(), 16); - strlcpy(them->dhost, result.c_str(), 16); + strlcpy(them->host, result.c_str(), 63); + strlcpy(them->dhost, result.c_str(), 63); strlcpy(them->ident, "~cgiirc", 8); } } + virtual void OnError(ResolverError e) + { + if ((them) && (them == fd_ref_table[theirfd])) + { + if (notify) + WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved!", them->nick, them->host, result.c_str(), typ.c_str()); + } + } + virtual ~CGIResolver() { } @@ -316,9 +325,6 @@ public: /*strlcpy(user->host, newip, 16); strlcpy(user->dhost, newip, 16); strlcpy(user->ident, "~cgiirc", 8);*/ - - /*if(NotifyOpers) - WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from ident", user->nick, user->host, newip);*/ return true; } |