mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Include action_with_args
in factoids export
This commit is contained in:
parent
736056b586
commit
7367e4f18c
@ -167,7 +167,15 @@ sub export_factoids {
|
|||||||
my $action = $self->factoids->hash->{$channel}->{$trigger}->{action};
|
my $action = $self->factoids->hash->{$channel}->{$trigger}->{action};
|
||||||
$action =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "<a href='http" . encode_entities($2) . "'>http" . encode_entities($2) . "<\/a>"/ge;
|
$action =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "<a href='http" . encode_entities($2) . "'>http" . encode_entities($2) . "<\/a>"/ge;
|
||||||
$action =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e;
|
$action =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e;
|
||||||
print FILE "<td width=100%><b>$trigger</b> is " . $action . "</td>\n";
|
|
||||||
|
if(exists $self->factoids->hash->{$channel}->{$trigger}->{action_with_args}) {
|
||||||
|
my $with_args = $self->factoids->hash->{$channel}->{$trigger}->{action_with_args};
|
||||||
|
$with_args =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "<a href='http" . encode_entities($2) . "'>http" . encode_entities($2) . "<\/a>"/ge;
|
||||||
|
$with_args =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e;
|
||||||
|
print FILE "<td width=100%><b>$trigger</b> is $action<br><br><b>with_args:</b> $with_args</td>\n";
|
||||||
|
} else {
|
||||||
|
print FILE "<td width=100%><b>$trigger</b> is $action</td>\n";
|
||||||
|
}
|
||||||
|
|
||||||
if(exists $self->factoids->hash->{$channel}->{$trigger}->{edited_by}) {
|
if(exists $self->factoids->hash->{$channel}->{$trigger}->{edited_by}) {
|
||||||
print FILE "<td>" . $self->factoids->hash->{$channel}->{$trigger}->{edited_by} . "</td>\n";
|
print FILE "<td>" . $self->factoids->hash->{$channel}->{$trigger}->{edited_by} . "</td>\n";
|
||||||
|
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 540,
|
BUILD_REVISION => 541,
|
||||||
BUILD_DATE => "2014-04-03",
|
BUILD_DATE => "2014-04-06",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user