mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Find factoids in proper channel namespace
This commit is contained in:
parent
b9b4a0e2d3
commit
715ff8ee78
@ -552,7 +552,7 @@ sub factshow {
|
|||||||
return "Usage: factshow <channel> <trigger>";
|
return "Usage: factshow <channel> <trigger>";
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($chan, $trig, undef, 0, 1);
|
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($chan, $trig, undef, 1, 1);
|
||||||
|
|
||||||
if(not defined $trigger) {
|
if(not defined $trigger) {
|
||||||
return "$trig not found in channel $chan";
|
return "$trig not found in channel $chan";
|
||||||
@ -578,7 +578,7 @@ sub factinfo {
|
|||||||
return "Usage: factinfo <channel> <trigger>";
|
return "Usage: factinfo <channel> <trigger>";
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($chan, $trig, undef, 0, 1);
|
my ($channel, $trigger) = $self->{pbot}->{factoids}->find_factoid($chan, $trig, undef, 1, 1);
|
||||||
|
|
||||||
if(not defined $trigger) {
|
if(not defined $trigger) {
|
||||||
return "$trig not found in channel $chan";
|
return "$trig not found in channel $chan";
|
||||||
|
@ -223,7 +223,7 @@ sub handle_result {
|
|||||||
if (defined $command) {
|
if (defined $command) {
|
||||||
my ($cmd, $args) = split / /, $command, 2;
|
my ($cmd, $args) = split / /, $command, 2;
|
||||||
if (not $self->{pbot}->{commands}->exists($cmd)) {
|
if (not $self->{pbot}->{commands}->exists($cmd)) {
|
||||||
my ($chan, $trigger) = $self->{pbot}->{factoids}->find_factoid($from, $cmd, $args, 0, 0, 1);
|
my ($chan, $trigger) = $self->{pbot}->{factoids}->find_factoid($from, $cmd, $args, 1, 0, 1);
|
||||||
if(defined $trigger) {
|
if(defined $trigger) {
|
||||||
if ($preserve_whitespace == 0) {
|
if ($preserve_whitespace == 0) {
|
||||||
$preserve_whitespace = $self->{pbot}->{factoids}->{factoids}->hash->{$chan}->{$trigger}->{preserve_whitespace};
|
$preserve_whitespace = $self->{pbot}->{factoids}->{factoids}->hash->{$chan}->{$trigger}->{preserve_whitespace};
|
||||||
|
Loading…
Reference in New Issue
Block a user