3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Fixed some stuff

This commit is contained in:
Pragmatic Software 2017-01-29 18:01:26 -08:00
parent 63f1f973b0
commit 85b8915494

View File

@ -547,6 +547,13 @@ sub factadd {
return "Usage: factadd <channel> <keyword> is <factoid>";
}
if ($from_chan !~ /^#/) {
if (lc $from_chan ne 'global' and $from_chan ne '.*') {
return "Usage: factadd <channel> <keyword> <text>";
}
}
$from_chan = '.*' if lc $from_chan eq 'global';
$from_chan = '.*' if not $from_chan =~ m/^#/;
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($from_chan, $keyword, undef, 1, 1);
@ -1125,8 +1132,8 @@ sub factchange {
}
$delim = quotemeta $delim;
if($arguments =~ /$delim(.*?)$delim(.*)$delim(.*)?$/) {
if($arguments =~ /\Q$keyword\E s$delim(.*?)$delim(.*)$delim(.*)?$/) {
$tochange = $1;
$changeto = $2;
$modifier = $3;