mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-20 15:30:40 +01:00
Improve factmove
detection of channel
This commit is contained in:
parent
23c2c3d84e
commit
6f9d9aba07
@ -460,6 +460,7 @@ sub factmove {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$target_channel = lc $target_channel;
|
$target_channel = lc $target_channel;
|
||||||
|
$target_channel = '.*' if $target_channel !~ /^#/;
|
||||||
|
|
||||||
$factoids->{$target_channel}->{$target} = $factoids->{$found_src_channel}->{$found_source};
|
$factoids->{$target_channel}->{$target} = $factoids->{$found_src_channel}->{$found_source};
|
||||||
delete $factoids->{$found_src_channel}->{$found_source};
|
delete $factoids->{$found_src_channel}->{$found_source};
|
||||||
@ -710,11 +711,11 @@ sub factshow {
|
|||||||
|
|
||||||
if (not defined $trig) {
|
if (not defined $trig) {
|
||||||
$trig = $chan;
|
$trig = $chan;
|
||||||
$chan = '.*';
|
$chan = $from;
|
||||||
$needs_disambig = 1;
|
$needs_disambig = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$chan = '.*' if $chan eq 'global';
|
$chan = '.*' if $chan !~ /^#/;
|
||||||
|
|
||||||
$chan = lc $chan;
|
$chan = lc $chan;
|
||||||
|
|
||||||
@ -752,6 +753,9 @@ sub factshow {
|
|||||||
$result .= ' [module]';
|
$result .= ' [module]';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$channel = 'global' if $channel eq '.*';
|
||||||
|
$chan = 'global' if $chan eq '.*';
|
||||||
|
|
||||||
$result = "[$channel] $result" if $channel ne $chan;
|
$result = "[$channel] $result" if $channel ne $chan;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user