mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Fixed some stuff
This commit is contained in:
parent
63f1f973b0
commit
85b8915494
@ -547,6 +547,13 @@ sub factadd {
|
|||||||
return "Usage: factadd <channel> <keyword> is <factoid>";
|
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/^#/;
|
$from_chan = '.*' if not $from_chan =~ m/^#/;
|
||||||
|
|
||||||
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($from_chan, $keyword, undef, 1, 1);
|
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($from_chan, $keyword, undef, 1, 1);
|
||||||
@ -1125,8 +1132,8 @@ sub factchange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$delim = quotemeta $delim;
|
$delim = quotemeta $delim;
|
||||||
|
|
||||||
if($arguments =~ /$delim(.*?)$delim(.*)$delim(.*)?$/) {
|
if($arguments =~ /\Q$keyword\E s$delim(.*?)$delim(.*)$delim(.*)?$/) {
|
||||||
$tochange = $1;
|
$tochange = $1;
|
||||||
$changeto = $2;
|
$changeto = $2;
|
||||||
$modifier = $3;
|
$modifier = $3;
|
||||||
|
Loading…
Reference in New Issue
Block a user