]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd_stats.cpp
Only assign NewServices once the duplicate check is done.
[user/henk/code/inspircd.git] / src / modules / m_httpd_stats.cpp
index 2b28c262802ff4f28c4973d87df0b7b21e745828..b40c44d120067fdf38cca0c41b42ecec80c1ad4d 100644 (file)
@@ -1,11 +1,19 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ *   Copyright (C) 2018 Matt Schatz <genius3000@g3k.solutions>
+ *   Copyright (C) 2016 Johanna A <johanna-a@users.noreply.github.com>
+ *   Copyright (C) 2013-2016 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2013, 2017, 2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008-2009 Robin Burchell <robin+git@viroteck.net>
  *   Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
- *   Copyright (C) 2006-2008 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2007 John Brooks <special@inspircd.org>
  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+ *   Copyright (C) 2006-2008, 2010 Craig Edwards <brain@inspircd.org>
  *
  * 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
@@ -86,7 +94,7 @@ namespace Stats
                for (Extensible::ExtensibleStore::const_iterator i = ext->GetExtList().begin(); i != ext->GetExtList().end(); i++)
                {
                        ExtensionItem* item = i->first;
-                       std::string value = item->serialize(FORMAT_USER, ext, i->second);
+                       std::string value = item->ToHuman(ext, i->second);
                        if (!value.empty())
                                data << "<meta name=\"" << item->name << "\">" << Sanitize(value) << "</meta>";
                        else if (!item->name.empty())
@@ -220,7 +228,7 @@ namespace Stats
 
                LocalUser* lu = IS_LOCAL(u);
                if (lu)
-                       data << "<local/><port>" << lu->GetServerPort() << "</port><servaddr>"
+                       data << "<local/><port>" << lu->server_sa.port() << "</port><servaddr>"
                                << lu->server_sa.str() << "</servaddr><connectclass>"
                                << lu->GetClass()->GetName() << "</connectclass><lastmsg>"
                                << lu->idle_lastmsg << "</lastmsg>";
@@ -477,7 +485,7 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides statistics over HTTP via m_httpd", VF_VENDOR);
+               return Version("Provides XML-serialised statistics about the server, channels, and users over HTTP via the /stats path.", VF_VENDOR);
        }
 };