From 7367e4f18c5e80996263a86499716b062ae0cc5a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 7 Apr 2014 04:50:00 +0000 Subject: [PATCH] Include `action_with_args` in factoids export --- PBot/Factoids.pm | 10 +++++++++- PBot/VERSION.pm | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 528f3f13..669edab4 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -167,7 +167,15 @@ sub export_factoids { my $action = $self->factoids->hash->{$channel}->{$trigger}->{action}; $action =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "http" . encode_entities($2) . "<\/a>"/ge; $action =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e; - print FILE "$trigger is " . $action . "\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) . "http" . encode_entities($2) . "<\/a>"/ge; + $with_args =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e; + print FILE "$trigger is $action

with_args: $with_args\n"; + } else { + print FILE "$trigger is $action\n"; + } if(exists $self->factoids->hash->{$channel}->{$trigger}->{edited_by}) { print FILE "" . $self->factoids->hash->{$channel}->{$trigger}->{edited_by} . "\n"; diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index e170475e..e3dc6d57 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 540, - BUILD_DATE => "2014-04-03", + BUILD_REVISION => 541, + BUILD_DATE => "2014-04-06", }; 1;