summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-02 17:23:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-02 17:23:40 +0000
commite06a27ff0c52acbee3299614c2f60d2cb53a9e60 (patch)
treedc83dc7ca3f28647ad4c317d569176f08f7d96ca /src/dns.cpp
parente786e52f6a59b5d3041befe59646a48e6dad393b (diff)
Added /stats T
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1280 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 8e3f4f48d..a9039fcdc 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <poll.h>
#include "dns.h"
-static const char tagstring[] = "$Id$";
+extern int statsAccept,statsRefused,statsUnknown,statsCollisions,statsDns,statsDnsGood,statsDnsBad,statsConnects,statsSent,statsRecv;
#define max(a,b) (a > b ? a : b)
#define DNS_MAX 8 /* max number of nameservers used */
@@ -691,6 +691,7 @@ DNS::~DNS()
bool DNS::ReverseLookup(std::string ip)
{
+ statsDns++;
binip = dns_aton4(ip.c_str());
if (binip == NULL) {
return false;
@@ -723,9 +724,11 @@ std::string DNS::GetResult()
{
result = dns_getresult(this->fd);
if (result) {
+ statsDnsGood++;
dns_close(this->fd);
return result;
} else {
+ statsDnsBad++;
return "";
}
}