inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 1ad063eff9d62c3331da5b11326d80511f9d135b
parent 0a229e70a5839b30d87f3585429d542db37c4cfd
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon,  4 Feb 2019 18:46:02 +0000

m_check: improve the output when showing list modes.

Closes #1568.

Diffstat:
Msrc/modules/m_check.cpp | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git 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); }