From 13b54f4446754a248efdbe4905efda7e582c644b Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Sun, 1 Mar 2015 05:16:22 +0400 Subject: Hide +s channels from public ;mship queries --- config-default/commands.xml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/config-default/commands.xml b/config-default/commands.xml index 2551867..848d48b 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -102,12 +102,17 @@ ", has sent $tx of data, and received $rx of data."); ]]> - - {mship})) { - $conn->privmsg($event->replyto, $1 . " is on: " . ASM::Util->commaAndify(sort @{$::sn{lc $1}->{mship}})); + + {mship})) { + if ($event->{to}->[0] =~ /^#/) { + $conn->privmsg($event->replyto, $nick . " is on: " . ASM::Util->commaAndify(sort(grep { not grep { /^s$/ } @{$::sc{$_}{modes}} } @{$::sn{lc $nick}->{mship}}))); + } else { + $conn->privmsg($event->replyto, $nick . " is on: " . ASM::Util->commaAndify(sort @{$::sn{lc $nick}->{mship}})); + } } else { - $conn->privmsg($event->replyto, "I don't see $1."); + $conn->privmsg($event->replyto, "I don't see $nick."); } ]]> -- cgit v1.2.3