From f63e4ceebe1df458b20e8ff9643ed4206982f8ae Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 8 Sep 2013 04:55:03 -0400 Subject: Alpabetize channels in /ns alist and on webcpanels chanserv page --- modules/commands/ns_alist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/commands') 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 queue; nc->GetChannelReferences(queue); + std::sort(queue.begin(), queue.end(), ChannelSort); if (queue.empty()) { -- cgit