summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_check.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 95e063e4d..ef9507aa1 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -65,6 +65,22 @@ class CheckContext
modelist.Flush();
}
+ void DumpExt(Extensible* ext)
+ {
+ CheckContext::List extlist(*this, "metadata");
+ 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);
+ if (!value.empty())
+ Write("meta:" + item->name, value);
+ else if (!item->name.empty())
+ extlist.Add(item->name);
+ }
+
+ extlist.Flush();
+ }
+
class List : public Numeric::GenericBuilder<' ', false, Numeric::WriteRemoteNumericSink>
{
public:
@@ -111,22 +127,6 @@ class CommandCheck : public Command
return ret;
}
- void dumpExt(CheckContext& context, Extensible* ext)
- {
- CheckContext::List extlist(context, "metadata");
- 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);
- if (!value.empty())
- context.Write("meta:" + item->name, value);
- else if (!item->name.empty())
- extlist.Add(item->name);
- }
-
- extlist.Flush();
- }
-
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName)
@@ -230,7 +230,7 @@ class CommandCheck : public Command
chanlist.Flush();
- dumpExt(context, targuser);
+ context.DumpExt(targuser);
}
else if (targchan)
{
@@ -268,7 +268,7 @@ class CommandCheck : public Command
for (ModeParser::ListModeList::const_iterator i = listmodes.begin(); i != listmodes.end(); ++i)
context.DumpListMode((*i)->GetList(targchan));
- dumpExt(context, targchan);
+ context.DumpExt(targchan);
}
else
{