summaryrefslogtreecommitdiff
path: root/modules/commands/ns_alist.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-08 04:55:03 -0400
committerAdam <Adam@anope.org>2013-09-08 04:55:03 -0400
commitf63e4ceebe1df458b20e8ff9643ed4206982f8ae (patch)
treeb6657421e5315631f078facf1a9b7503ca240d92 /modules/commands/ns_alist.cpp
parentb005089f2f713271d5db2be681dab49191ed5e4e (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.cpp6
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())
{