X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmodules%2Fdns.h;h=6e7527a55c6ab75672aeec72f1e714c7b948712e;hb=b191657921845a26128e910bfff0f21251e98ee4;hp=61abd7144288c5a9c904645f900a87521e3eb9c1;hpb=bb4aa10ed82612624da45d0c9592ddf7f2f51ab5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules/dns.h b/include/modules/dns.h index 61abd7144..6e7527a55 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -1,8 +1,9 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013 Adam - * Copyright (C) 2003-2013 Anope Team + * Copyright (C) 2017, 2019 Sadie Powell + * Copyright (C) 2014-2015 Attila Molnar + * Copyright (C) 2013, 2015-2016 Adam * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -56,6 +57,7 @@ namespace DNS enum Error { ERROR_NONE, + ERROR_DISABLED, ERROR_UNKNOWN, ERROR_UNLOADED, ERROR_TIMEDOUT, @@ -146,6 +148,7 @@ namespace DNS virtual void Process(Request* req) = 0; virtual void RemoveRequest(Request* req) = 0; virtual std::string GetErrorStr(Error) = 0; + virtual std::string GetTypeStr(QueryType) = 0; }; /** A DNS query. @@ -164,7 +167,7 @@ namespace DNS Module* const creator; Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true) - : Timer((ServerInstance->Config->dns_timeout ? ServerInstance->Config->dns_timeout : 5)) + : Timer(ServerInstance->Config->ConfValue("dns")->getDuration("timeout", 5, 1)) , manager(mgr) , question(addr, qt) , use_cache(usecache) @@ -191,7 +194,7 @@ namespace DNS /** Used to time out the query, calls OnError and asks the TimerManager * to delete this request */ - bool Tick(time_t now) + bool Tick(time_t now) CXX11_OVERRIDE { Query rr(this->question); rr.error = ERROR_TIMEDOUT;