3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Factoids/Quotegrabs: use botnick value when exporting

This commit is contained in:
Pragmatic Software 2019-12-19 23:39:46 -08:00
parent 94eba5f161
commit 37b7570c7f
2 changed files with 4 additions and 2 deletions

View File

@ -153,13 +153,14 @@ sub export_factoids {
open FILE, "> $filename" or return "Could not open export path.";
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
my $time = localtime;
print FILE "<html><head>\n<link href='css/blue.css' rel='stylesheet' type='text/css'>\n";
print FILE '<script type="text/javascript" src="js/jquery-latest.js"></script>' . "\n";
print FILE '<script type="text/javascript" src="js/jquery.tablesorter.js"></script>' . "\n";
print FILE '<script type="text/javascript" src="js/picnet.table.filter.min.js"></script>' . "\n";
print FILE "</head>\n<body><i>Last updated at $time</i>\n";
print FILE "<hr><h2>Candide's factoids</h2>\n";
print FILE "<hr><h2>$botnick\'s factoids</h2>\n";
my $i = 0;
my $table_id = 1;

View File

@ -78,11 +78,12 @@ sub export_quotegrabs {
my $had_table = 0;
open FILE, "> $self->{export_path}" or return "Could not open export path.";
my $time = localtime;
my $botnick = $self->{pbot}->{registry}->get_value('irc', 'botnick');
print FILE "<html>\n<head><link href=\"css/blue.css\" rel=\"stylesheet\" type=\"text/css\">\n";
print FILE '<script type="text/javascript" src="js/jquery-latest.js"></script>' . "\n";
print FILE '<script type="text/javascript" src="js/jquery.tablesorter.js"></script>' . "\n";
print FILE '<script type="text/javascript" src="js/picnet.table.filter.min.js"></script>' . "\n";
print FILE "</head>\n<body><i>Generated at $time</i><hr><h2>Candide's Quotegrabs</h2>\n";
print FILE "</head>\n<body><i>Generated at $time</i><hr><h2>$botnick\'s Quotegrabs</h2>\n";
my $i = 0;
my $last_channel = "";