InspIRCd  2.0
Public Member Functions | List of all members
UserResolver Class Reference

#include <users.h>

Inheritance diagram for UserResolver:

Public Member Functions

 UserResolver (LocalUser *user, std::string to_resolve, QueryType qt, bool &cache)
void OnLookupComplete (const std::string &result, unsigned int ttl, bool cached)
void OnError (ResolverError e, const std::string &errormessage)
- Public Member Functions inherited from Resolver
 Resolver (const std::string &source, QueryType qt, bool &cached, Module *creator)
virtual ~Resolver ()
int GetId ()
ModuleGetCreator ()
void TriggerCachedResult ()

Additional Inherited Members

- Protected Attributes inherited from Resolver
ModuleRef Creator
std::string input
QueryType querytype
std::string server
int myid
int time_left

Detailed Description

Derived from Resolver, and performs user forward/reverse lookups.

Constructor & Destructor Documentation

◆ UserResolver()

UserResolver::UserResolver ( LocalUser user,
std::string  to_resolve,
QueryType  qt,
bool &  cache 

Create a resolver.

userThe user to begin lookup on
to_resolveThe IP or host to resolve
qtThe query type
cacheModified by the constructor if the result was cached

Member Function Documentation

◆ OnError()

void UserResolver::OnError ( ResolverError  e,
const std::string &  errormessage 

Called on failed lookup

eError code
errormessageError message string

Reimplemented from Resolver.

◆ OnLookupComplete()

void UserResolver::OnLookupComplete ( const std::string &  result,
unsigned int  ttl,
bool  cached 

Called on successful lookup

resultResult string
ttlTime to live for result
cachedTrue if the result was found in the cache

Implements Resolver.

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