- ServerInstance->SNO->WriteGlobalSno('w', "Connecting user %s tried to use WEBIRC, but didn't match any configured webirc blocks.", user->GetFullRealHost().c_str());
- return CMD_FAILURE;
- }
-};
-
-
-/** Resolver for CGI:IRC hostnames encoded in ident/GECOS
- */
-class CGIResolver : public DNS::Request
-{
- std::string typ;
- std::string theiruid;
- LocalIntExt& waiting;
- bool notify;
- public:
- CGIResolver(DNS::Manager *mgr, Module* me, bool NotifyOpers, const std::string &source, LocalUser* u,
- const std::string &ttype, LocalIntExt& ext)
- : DNS::Request(mgr, me, source, DNS::QUERY_PTR), typ(ttype), theiruid(u->uuid),
- waiting(ext), notify(NotifyOpers)
- {
- }
-
- void OnLookupComplete(const DNS::Query *r) CXX11_OVERRIDE
- {
- /* Check the user still exists */
- User* them = ServerInstance->FindUUID(theiruid);
- if ((them) && (!them->quitting))
- {
- LocalUser* lu = IS_LOCAL(them);
- if (!lu)
- return;
-
- const DNS::ResourceRecord &ans_record = r->answers[0];
- if (ans_record.rdata.empty() || ans_record.rdata.length() > ServerInstance->Config->Limits.MaxHost)
- return;
+ // Inform modules about the WebIRC attempt.
+ FOREACH_MOD_CUSTOM(webircevprov, WebIRC::EventListener, OnWebIRCAuth, (user, (hasflags ? &flags : NULL)));