mirror of
https://github.com/anope/anope.git
synced 2026-07-03 08:53:12 +02:00
os_list: show number of channels listed, too
This commit is contained in:
@@ -26,6 +26,7 @@ class CommandOSChanList : public Command
|
||||
const Anope::string &opt = params.size() > 1 ? params[1] : "";
|
||||
std::set<Anope::string> modes;
|
||||
User *u2;
|
||||
unsigned int count = 0;
|
||||
|
||||
if (!pattern.empty())
|
||||
Log(LOG_ADMIN, source, this) << "for " << pattern;
|
||||
@@ -60,6 +61,8 @@ class CommandOSChanList : public Command
|
||||
entry["Modes"] = cc->chan->GetModes(true, true);
|
||||
entry["Topic"] = cc->chan->topic;
|
||||
list.AddEntry(entry);
|
||||
|
||||
++count;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -83,6 +86,8 @@ class CommandOSChanList : public Command
|
||||
entry["Modes"] = c->GetModes(true, true);
|
||||
entry["Topic"] = c->topic;
|
||||
list.AddEntry(entry);
|
||||
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +97,7 @@ class CommandOSChanList : public Command
|
||||
for (unsigned i = 0; i < replies.size(); ++i)
|
||||
source.Reply(replies[i]);
|
||||
|
||||
source.Reply(_("End of channel list."));
|
||||
source.Reply(_("End of channel list. \002%u\002 channels shown."), count);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
|
||||
Reference in New Issue
Block a user