summaryrefslogtreecommitdiffstats
path: root/config-default
diff options
context:
space:
mode:
Diffstat (limited to 'config-default')
-rw-r--r--config-default/commands.xml15
1 files 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.");
]]>
</command>
- <command cmd="^;mship (\S+)$" flag="s">
- <![CDATA[
- if (defined($::sn{lc $1}->{mship})) {
- $conn->privmsg($event->replyto, $1 . " is on: " . ASM::Util->commaAndify(sort @{$::sn{lc $1}->{mship}}));
+ <command cmd="^;mship (\S+)" flag="s">
+ <![CDATA[
+ my $nick = $1;
+ if (defined($::sn{lc $nick}->{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.");
}
]]>
</command>