The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CGIResolver Class Reference

Resolver for CGI:IRC hostnames encoded in ident/GECOS. More...

Inheritance diagram for CGIResolver:

Inheritance graph
[legend]
Collaboration diagram for CGIResolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CGIResolver (Module *me, InspIRCd *Instance, bool NotifyOpers, const std::string &source, bool forward, User *u, int userfd, const std::string &type, bool &cached)
virtual void OnLookupComplete (const std::string &result, unsigned int ttl, bool cached, int resultnum=0)
 When your lookup completes, this method will be called.
virtual void OnError (ResolverError e, const std::string &errormessage)
 If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.
virtual ~CGIResolver ()

Private Attributes

std::string typ
int theirfd
Userthem
bool notify

Detailed Description

Resolver for CGI:IRC hostnames encoded in ident/GECOS.

Definition at line 92 of file m_cgiirc.cpp.


Constructor & Destructor Documentation

CGIResolver::CGIResolver Module me,
InspIRCd Instance,
bool  NotifyOpers,
const std::string source,
bool  forward,
User u,
int  userfd,
const std::string type,
bool &  cached
[inline]
 

Definition at line 99 of file m_cgiirc.cpp.

virtual CGIResolver::~CGIResolver  )  [inline, virtual]
 

Definition at line 130 of file m_cgiirc.cpp.


Member Function Documentation

virtual void CGIResolver::OnError ResolverError  e,
const std::string errormessage
[inline, virtual]
 

If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.

Parameters:
e A ResolverError enum containing the error type which has occured.
errormessage The error text of the error that occured.

Reimplemented from Resolver.

Definition at line 121 of file m_cgiirc.cpp.

References SocketEngine::GetRef(), connection::host, User::nick, notify, InspIRCd::SE, Resolver::ServerInstance, InspIRCd::SNO, theirfd, them, typ, and SnomaskManager::WriteToSnoMask().

virtual void CGIResolver::OnLookupComplete const std::string result,
unsigned int  ttl,
bool  cached,
int  resultnum = 0
[inline, virtual]
 

When your lookup completes, this method will be called.

Parameters:
result The resulting DNS lookup, either an IP address or a hostname.
ttl The time-to-live value of the result, in the instance of a cached result, this is the number of seconds remaining before refresh/expiry.
cached True if the result is a cached result, false if it was requested from the DNS server.
resultnum Result number, for records with multiple matching results. Normally, you will only want to act on this when the result is 0.

Implements Resolver.

Definition at line 102 of file m_cgiirc.cpp.

References User::CheckLines(), User::dhost, SocketEngine::GetRef(), connection::host, User::ident, User::InvalidateCache(), User::nick, notify, InspIRCd::SE, Resolver::ServerInstance, InspIRCd::SNO, theirfd, them, typ, and SnomaskManager::WriteToSnoMask().


Member Data Documentation

bool CGIResolver::notify [private]
 

Definition at line 97 of file m_cgiirc.cpp.

Referenced by OnError(), and OnLookupComplete().

int CGIResolver::theirfd [private]
 

Definition at line 95 of file m_cgiirc.cpp.

Referenced by OnError(), and OnLookupComplete().

User* CGIResolver::them [private]
 

Definition at line 96 of file m_cgiirc.cpp.

Referenced by OnError(), and OnLookupComplete().

std::string CGIResolver::typ [private]
 

Definition at line 94 of file m_cgiirc.cpp.

Referenced by OnError(), and OnLookupComplete().


The documentation for this class was generated from the following file: