-/** Resolver for CGI:IRC hostnames encoded in ident/GECOS
- */
-class CGIResolver : public Resolver
-{
- std::string typ;
- std::string theiruid;
- LocalIntExt& waiting;
- bool notify;
- public:
- CGIResolver(Module* me, bool NotifyOpers, const std::string &source, LocalUser* u,
- const std::string &type, bool &cached, LocalIntExt& ext)
- : Resolver(source, DNS_QUERY_PTR4, cached, me), typ(type), theiruid(u->uuid),
- waiting(ext), notify(NotifyOpers)
- {
- }
-
- virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
- {
- /* Check the user still exists */
- User* them = ServerInstance->FindUUID(theiruid);
- 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());
-
- if (result.length() > 64)
- return;
- them->host = result;
- them->dhost = result;
- them->InvalidateCache();
- them->CheckLines(true);
+ // Set the IP address sent via WEBIRC. We ignore the hostname and lookup
+ // instead do our own DNS lookups because of unreliable gateways.
+ user->SetClientIP(ipaddr);
+ return CMD_SUCCESS;