aboutsummaryrefslogtreecommitdiff
path: root/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'Plugin')
-rw-r--r--Plugin/Map.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Plugin/Map.pm b/Plugin/Map.pm
index fb37e64..665f41f 100644
--- a/Plugin/Map.pm
+++ b/Plugin/Map.pm
@@ -46,7 +46,7 @@ sub parse_list {
$nest--;
}
- if ($c eq "," || ($nest == 0 and $c eq "]")) {
+ if (($nest == 1 and $c eq ",") || ($nest == 0 and $c eq "]")) {
my $item = substr($input, $item_i, $i - $item_i);
$item =~ s/^\s+|\s+$//g;
push @res, $item;
@@ -66,7 +66,7 @@ sub parse_list {
sub map {
my ($self, $irc, $logger, $who, $where, $rest, @arguments) = @_;
- my ($command, $subjects_raw) = ($rest =~ /^(.+?)\s+(.*)$/);
+ my ($command, $subjects_raw) = ($rest =~ /^(.+)\s+(\[.*\])$/);
return "Syntax: map command [item1, item2, ...]" unless $command and $subjects_raw;