From f1ca6c6d71f3e31b333e0be45294bcb30fd89b4d Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 7 Jan 2007 21:35:25 +0000 Subject: DNS caching stuff (almost done) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_testcommand.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/modules/m_testcommand.cpp') diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp index 55632c98e..761196978 100644 --- a/src/modules/m_testcommand.cpp +++ b/src/modules/m_testcommand.cpp @@ -60,24 +60,11 @@ class cmd_woot : public command_t * do it for us as required.*/ try { - bool cached1, cached2; - MyV6Resolver* r = new MyV6Resolver(ServerInstance, Creator, "shake.stacken.kth.se", true, cached1); - if (!cached1) - ServerInstance->AddResolver(r); - else - { - ServerInstance->Log(DEBUG,"Result was cached, delete object"); - delete r; - } - - r = new MyV6Resolver(ServerInstance, Creator, "2001:6b0:1:ea:202:a5ff:fecd:13a6", false, cached2); - if (!cached2) - ServerInstance->AddResolver(r); - else - { - ServerInstance->Log(DEBUG,"Result was cached, delete object"); - delete r; - } + bool cached; + MyV6Resolver* r = new MyV6Resolver(ServerInstance, Creator, "shake.stacken.kth.se", true, cached); + ServerInstance->AddResolver(r, cached); + r = new MyV6Resolver(ServerInstance, Creator, "2001:6b0:1:ea:202:a5ff:fecd:13a6", false, cached); + ServerInstance->AddResolver(r, cached); } catch (ModuleException& e) { -- cgit v1.2.3