summaryrefslogtreecommitdiff
path: root/src/modules/m_cgiirc.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 19:25:31 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 19:25:31 +0000
commit48262da087538c38b91bf3a1a51ffaa5e61e502f (patch)
tree2f2fe843c29362f47bf2b4f1d1ac34564176fbf3 /src/modules/m_cgiirc.cpp
parent9bc04a302572eb311a147a32ff1d36f1d91f2d7a (diff)
Change some resolver stuff.
OM, THIS STILL WONT COMPILE! Error on the same line git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4821 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
-rw-r--r--src/modules/m_cgiirc.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 4fcb0be13..31b5dc092 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -29,9 +29,7 @@
/* $ModDesc: Change user's hosts connecting from known CGI:IRC hosts */
-
-/* We need this for checking our user hasnt /quit before we finish our lookup */
-extern userrec* fd_ref_table[MAX_DESCRIPTORS];
+extern InspIRCd* ServerInstance;
enum CGItype { PASS, IDENT, PASSFIRST, IDENTFIRST };
@@ -57,12 +55,12 @@ class CGIResolver : public Resolver
bool notify;
public:
CGIResolver(bool NotifyOpers, const std::string &source, bool forward, userrec* u, int userfd, const std::string &type)
- : Resolver(source, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { }
+ : Resolver(ServerInstance, source, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { }
virtual void OnLookupComplete(const std::string &result)
{
/* Check the user still exists */
- if ((them) && (them == fd_ref_table[theirfd]))
+ if ((them) && (them == ServerInstance->fd_ref_table[theirfd]))
{
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());
@@ -75,7 +73,7 @@ class CGIResolver : public Resolver
virtual void OnError(ResolverError e, const std::string &errormessage)
{
- if ((them) && (them == fd_ref_table[theirfd]))
+ if ((them) && (them == ServerInstance->fd_ref_table[theirfd]))
{
if (notify)
WriteOpers("*** Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick, them->host,typ.c_str());