]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/user_resolver.cpp
Move whowas settings into cmd_whowas from ConfigReader
[user/henk/code/inspircd.git] / src / user_resolver.cpp
index ecd864a698ae36ce23ef75b378772bd0a61ef08c..1f88018c607404a8cfe5c3ef054adf1caca0e8f6 100644 (file)
@@ -1,16 +1,23 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
  *
- * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ * 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
+ * License as published by the Free Software Foundation, version 2.
  *
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 #include "inspircd.h"
 UserResolver::UserResolver(LocalUser* user, std::string to_resolve, QueryType qt, bool &cache) :
        Resolver(to_resolve, qt, cache, NULL), uuid(user->uuid)
@@ -80,7 +87,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
                                rev_match = !memcmp(&user_ip->in4.sin_addr, &res_bin, sizeof(res_bin));
                        }
                }
-               
+
                if (rev_match)
                {
                        std::string hostname = bound_user->stored_host;
@@ -105,7 +112,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
                        {
                                if (!bound_user->dns_done)
                                {
-                                       bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", bound_user->GetIPString());
+                                       bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", bound_user->GetIPString().c_str());
                                        bound_user->dns_done = true;
                                }
                        }
@@ -114,7 +121,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
                {
                        if (!bound_user->dns_done)
                        {
-                               bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", bound_user->GetIPString());
+                               bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", bound_user->GetIPString().c_str());
                                bound_user->dns_done = true;
                        }
                }
@@ -129,7 +136,7 @@ void UserResolver::OnError(ResolverError e, const std::string &errormessage)
        LocalUser* bound_user = (LocalUser*)ServerInstance->FindUUID(uuid);
        if (bound_user)
        {
-               bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), bound_user->GetIPString());
+               bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), bound_user->GetIPString().c_str());
                bound_user->dns_done = true;
                bound_user->stored_host.resize(0);
                ServerInstance->stats->statsDnsBad++;