mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +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 = '.*' if $target_channel !~ /^#/;
|
||||
|
||||
$factoids->{$target_channel}->{$target} = $factoids->{$found_src_channel}->{$found_source};
|
||||
delete $factoids->{$found_src_channel}->{$found_source};
|
||||
@ -710,11 +711,11 @@ sub factshow {
|
||||
|
||||
if (not defined $trig) {
|
||||
$trig = $chan;
|
||||
$chan = '.*';
|
||||
$chan = $from;
|
||||
$needs_disambig = 1;
|
||||
}
|
||||
|
||||
$chan = '.*' if $chan eq 'global';
|
||||
$chan = '.*' if $chan !~ /^#/;
|
||||
|
||||
$chan = lc $chan;
|
||||
|
||||
@ -752,6 +753,9 @@ sub factshow {
|
||||
$result .= ' [module]';
|
||||
}
|
||||
|
||||
$channel = 'global' if $channel eq '.*';
|
||||
$chan = 'global' if $chan eq '.*';
|
||||
|
||||
$result = "[$channel] $result" if $channel ne $chan;
|
||||
|
||||
return $result;
|
||||
|
Loading…
Reference in New Issue
Block a user