summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd_stats.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 03:09:39 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 03:09:39 +0000
commita8878569083bfa4753e9e118adee0ed1da6a0325 (patch)
treeff2f02e58a865d306957b7bda3ac99b36e4b2907 /src/modules/m_httpd_stats.cpp
parente50d016aa23083f81dcf181f68edb81c5b23c78d (diff)
Fix null dereference caused by tracking dummy
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11902 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd_stats.cpp')
-rw-r--r--src/modules/m_httpd_stats.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index a451f6af9..5288130ce 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -73,10 +73,10 @@ class ModuleHttpStats : public Module
{
ExtensionItem* item = i->first;
std::string value = item->serialize(FORMAT_USER, ext, i->second);
- if (value.empty())
- data << "<meta name=\"" << item->key << "\"/>";
- else
+ if (!value.empty())
data << "<meta name=\"" << item->key << "\">" << Sanitize(value) << "</meta>";
+ else if (!item->key.empty())
+ data << "<meta name=\"" << item->key << "\"/>";
}
data << "</metadata>";
}
@@ -144,7 +144,9 @@ class ModuleHttpStats : public Module
Membership* memb = x->second;
data << "<channelmember><uid>" << memb->user->uuid << "</uid><privs>"
<< Sanitize(c->GetAllPrefixChars(x->first)) << "</privs><modes>"
- << memb->modes << "</modes></channelmember>";
+ << memb->modes << "</modes>";
+ DumpMeta(data, memb);
+ data << "</channelmember>";
}
DumpMeta(data, c);