summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-02-04 18:46:02 +0000
committerPeter Powell <petpow@saberuk.com>2019-02-04 18:46:02 +0000
commit1ad063eff9d62c3331da5b11326d80511f9d135b (patch)
tree5687f3e4e0e1d3df7ca5ce38c879a880bf3bc06a /src/modules
parent0a229e70a5839b30d87f3585429d542db37c4cfd (diff)
m_check: improve the output when showing list modes.
Closes #1568.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_check.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 65cccec5b..58e71aadc 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -67,16 +67,21 @@ class CheckContext
User* GetUser() const { return user; }
- void DumpListMode(const ListModeBase::ModeList* list)
+ void DumpListMode(ListModeBase* mode, Channel* chan)
{
+ const ListModeBase::ModeList* list = mode->GetList(chan);
if (!list)
return;
- CheckContext::List modelist(*this, "modelist");
for (ListModeBase::ModeList::const_iterator i = list->begin(); i != list->end(); ++i)
- modelist.Add(i->mask);
-
- modelist.Flush();
+ {
+ CheckContext::List listmode(*this, "listmode");
+ listmode.Add(ConvToStr(mode->GetModeChar()));
+ listmode.Add(i->mask);
+ listmode.Add(i->setter);
+ listmode.Add(FormatTime(i->time));
+ listmode.Flush();
+ }
}
void DumpExt(Extensible* ext)
@@ -266,7 +271,7 @@ class CommandCheck : public Command
const ModeParser::ListModeList& listmodes = ServerInstance->Modes->GetListModes();
for (ModeParser::ListModeList::const_iterator i = listmodes.begin(); i != listmodes.end(); ++i)
- context.DumpListMode((*i)->GetList(targchan));
+ context.DumpListMode(*i, targchan);
context.DumpExt(targchan);
}