summaryrefslogtreecommitdiff
path: root/src/modules/m_cgiirc.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-29 19:39:13 +0100
committerattilamolnar <attilamolnar@hush.com>2012-11-29 20:26:17 +0100
commitd53f0956ab7ff6b63430bb62ba7dbcfd2fde8e41 (patch)
tree0e9bf176c2886966eb372b4a72e7d2f09041617c /src/modules/m_cgiirc.cpp
parent129dfe60ae37147fea2b5bc78aae539120d847bc (diff)
m_cgiirc Don't apply resolved host or send notifications when the user is quitting (matched a line)
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
-rw-r--r--src/modules/m_cgiirc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 22a5243b8..f6ad5992a 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -130,7 +130,7 @@ class CGIResolver : public Resolver
{
/* Check the user still exists */
User* them = ServerInstance->FindUUID(theiruid);
- if (them)
+ if ((them) && (!them->quitting))
{
if (notify)
ServerInstance->SNO->WriteGlobalSno('a', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick.c_str(), them->host.c_str(), result.c_str(), typ.c_str());
@@ -146,11 +146,13 @@ class CGIResolver : public Resolver
virtual void OnError(ResolverError e, const std::string &errormessage)
{
+ if (!notify)
+ return;
+
User* them = ServerInstance->FindUUID(theiruid);
- if (them)
+ if ((them) && (!them->quitting))
{
- if (notify)
- ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
+ ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
}
}