mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-29 23:39:24 +01:00
Exported factoids now have clickable links
This commit is contained in:
parent
affb2c66d5
commit
28a5d47af1
@ -137,7 +137,11 @@ sub export_factoids {
|
|||||||
print FILE "<tr>\n";
|
print FILE "<tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print FILE "<td width=100%><b>$trigger</b> is " . encode_entities($self->factoids->hash->{$channel}->{$trigger}->{action}) . "</td>\n";
|
my $action = $self->factoids->hash->{$channel}->{$trigger}->{action};
|
||||||
|
$action =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "<a href='http$2'>http$2<\/a>"/ge;
|
||||||
|
$action =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e;
|
||||||
|
|
||||||
|
print FILE "<td width=100%><b>$trigger</b> is " . $action . "</td>\n";
|
||||||
|
|
||||||
print FILE "<td align=\"right\" nowrap>- submitted by " . $self->factoids->hash->{$channel}->{$trigger}->{owner} . "<br><i>" . localtime($self->factoids->hash->{$channel}->{$trigger}->{created_on}) . "</i>\n</td>\n</tr>\n";
|
print FILE "<td align=\"right\" nowrap>- submitted by " . $self->factoids->hash->{$channel}->{$trigger}->{owner} . "<br><i>" . localtime($self->factoids->hash->{$channel}->{$trigger}->{created_on}) . "</i>\n</td>\n</tr>\n";
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ 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 => 225,
|
BUILD_REVISION => 226,
|
||||||
BUILD_DATE => "2010-06-30",
|
BUILD_DATE => "2010-06-30",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user