diff --git a/PBot/Quotegrabs.pm b/PBot/Quotegrabs.pm index dfbedafc..42c8fce2 100644 --- a/PBot/Quotegrabs.pm +++ b/PBot/Quotegrabs.pm @@ -116,7 +116,6 @@ sub export_quotegrabs() { return "Not enabled" if not defined $self->{export_path}; my $text; my $table_id = 1; - my $last_channel = ""; my $had_table = 0; open FILE, "> $self->{export_path}" or return "Could not open export path."; my $time = localtime; @@ -125,9 +124,20 @@ sub export_quotegrabs() { print FILE '' . "\n"; print FILE "\nGenerated at $time

Candide's Quotegrabs

\n"; my $i = 0; + + my $last_channel = ""; + foreach my $quotegrab (sort { $$a{channel} cmp $$b{channel} or $$a{nick} cmp $$b{nick} } @{ $self->{quotegrabs} }) { + if(not $quotegrab->{channel} =~ /^$last_channel$/i) { + print FILE "" . encode_entities($quotegrab->{channel}) . "
\n"; + $last_channel = $quotegrab->{channel}; + } + } + + $last_channel = ""; foreach my $quotegrab (sort { $$a{channel} cmp $$b{channel} or $$a{nick} cmp $$b{nick} } @{ $self->{quotegrabs} }) { if(not $quotegrab->{channel} =~ /^$last_channel$/i) { print FILE "\n\n" if $had_table; + print FILE "\n"; print FILE "

$quotegrab->{channel}


\n"; print FILE "\n"; print FILE "\n\n"; diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index e8d004da..94572e13 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 448, + BUILD_REVISION => 449, BUILD_DATE => "2013-10-13", };