From e3dea4bdbcd3526e1cc084f102e663252daf6807 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Sun, 1 Mar 2015 05:13:28 +0400 Subject: Let admins check the state of the monitor flag --- 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 06243a2..2551867 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -125,18 +125,23 @@ $::db->raw($conn, $event->{to}->[0], $dbh, $2); ]]> - + getLink(lc $chan); if ( lc $link ne lc $chan ) { $conn->privmsg($event->replyto, "Error: $chan is linked to $link - use $link instead."); return; } - $::channels->{channel}->{$chan}->{monitor} = $switch; - ASM::XML->writeChannels(); - $conn->privmsg($event->replyto, "Monitor flag for $chan set to $switch"); + if (defined($2)) { + my $switch = lc $2; + $::channels->{channel}->{$chan}->{monitor} = $switch; + ASM::XML->writeChannels(); + $conn->privmsg($event->replyto, "Monitor flag for $chan set to $switch"); + } else { + my $switch = $::channels->{channel}->{$chan}->{monitor}; + $conn->privmsg($event->replyto, "Monitor flag for $chan is currently set to $switch"); + } ]]> -- cgit v1.2.3