From 7984f41072c8dde6135f71b0589822d45d494b92 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 12 Jul 2006 14:16:31 +0000 Subject: Seems to work ok git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4365 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cgiirc.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3