mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Allow adding channels as factoid adlib modifier
This commit is contained in:
parent
2c59908ee8
commit
54b8750d1b
@ -356,7 +356,7 @@ sub find_factoid {
|
||||
sub expand_factoid_vars {
|
||||
my ($self, $from, $action) = @_;
|
||||
|
||||
while ($action =~ /(?<!\\)\$([a-zA-Z0-9_:\-]+)/g) {
|
||||
while ($action =~ /(?<!\\)\$([a-zA-Z0-9_:\-#]+)/g) {
|
||||
my $v = $1;
|
||||
next if $v =~ m/^(nick|channel|randomnick|args|arg\[.+\])$/; # don't override special variables
|
||||
|
||||
@ -365,7 +365,7 @@ sub expand_factoid_vars {
|
||||
$modifier = $1;
|
||||
}
|
||||
|
||||
if ($modifier =~ m/^:(#.*|global)$/i) {
|
||||
if ($modifier =~ m/^:(#[^:]+|global)/i) {
|
||||
$from = $1;
|
||||
$from = '.*' if lc $from eq 'global';
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 1268,
|
||||
BUILD_REVISION => 1269,
|
||||
BUILD_DATE => "2015-10-05",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user