yiff.pl: lol regex

This commit is contained in:
wowaname 2016-09-30 23:06:01 +00:00
parent 79db45e309
commit 3362f896e1

View File

@ -80,7 +80,7 @@ sub yiff {
sub cmd_yiff {
my $buffer = $_[1];
my ($dbfile, $target) = $_[2] =~ /^(|-[^ ]+) *([^ ]*)/;
my ($dbfile, $target) = $_[2] =~ /^(-[^ ]+|) *([^ ]*)/;
my @users = nicklist($buffer);
return yiff($buffer, $dbfile, $target, @users);
@ -88,7 +88,7 @@ sub cmd_yiff {
sub cmd_ryiff {
my $buffer = $_[1];
my ($dbfile) = $_[2] =~ /^(|-[^ ]+)/;
my ($dbfile) = $_[2] =~ /^(-[^ ]+|)/;
my @users = nicklist($buffer);
my $target = $users[rand @users];