Allow adding channels as factoid adlib modifier

This commit is contained in:
Pragmatic Software 2015-10-05 02:11:52 -07:00
parent 2c59908ee8
commit 54b8750d1b
2 changed files with 3 additions and 3 deletions

View File

@ -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';
}

View File

@ -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",
};