diff options
author | Adam <Adam@anope.org> | 2013-09-08 04:55:03 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-08 04:55:03 -0400 |
commit | f63e4ceebe1df458b20e8ff9643ed4206982f8ae (patch) | |
tree | b6657421e5315631f078facf1a9b7503ca240d92 /modules/commands/ns_alist.cpp | |
parent | b005089f2f713271d5db2be681dab49191ed5e4e (diff) |
Alpabetize channels in /ns alist and on webcpanels chanserv page
Diffstat (limited to 'modules/commands/ns_alist.cpp')
-rw-r--r-- | modules/commands/ns_alist.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp index 2d7b02cfd..d9e91af52 100644 --- a/modules/commands/ns_alist.cpp +++ b/modules/commands/ns_alist.cpp @@ -13,6 +13,11 @@ class CommandNSAList : public Command { + static bool ChannelSort(ChannelInfo *ci1, ChannelInfo *ci2) + { + return ci::less()(ci1->name, ci2->name); + } + public: CommandNSAList(Module *creator) : Command(creator, "nickserv/alist", 0, 2) { @@ -46,6 +51,7 @@ class CommandNSAList : public Command std::deque<ChannelInfo *> queue; nc->GetChannelReferences(queue); + std::sort(queue.begin(), queue.end(), ChannelSort); if (queue.empty()) { |