mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-19 23:10:44 +01:00
Search all channels if target channel is not a valid channel (private message, for instance)
This commit is contained in:
parent
04f47ba3a1
commit
ec13cf14bc
@ -88,6 +88,7 @@ sub add_factoid {
|
|||||||
my ($type, $channel, $owner, $trigger, $action, $dont_save) = @_;
|
my ($type, $channel, $owner, $trigger, $action, $dont_save) = @_;
|
||||||
|
|
||||||
$type = lc $type;
|
$type = lc $type;
|
||||||
|
$channel = '.*' if $channel !~ /^#/;
|
||||||
$channel = lc $channel;
|
$channel = lc $channel;
|
||||||
|
|
||||||
$self->{factoids}->hash->{$channel}->{$trigger}->{enabled} = 1;
|
$self->{factoids}->hash->{$channel}->{$trigger}->{enabled} = 1;
|
||||||
@ -106,6 +107,7 @@ sub remove_factoid {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($channel, $trigger) = @_;
|
my ($channel, $trigger) = @_;
|
||||||
|
|
||||||
|
$channel = '.*' if $channel !~ /^#/;
|
||||||
$channel = lc $channel;
|
$channel = lc $channel;
|
||||||
|
|
||||||
delete $self->{factoids}->hash->{$channel}->{$trigger};
|
delete $self->{factoids}->hash->{$channel}->{$trigger};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user