-@chatlog = reverse @chatlog;
-foreach $row(@chatlog) {
- ($time, $call, $group) = ($row =~ m/^(\S+) (\S+) -> (\S+) /o);
- if (!exists $g->{$group}) {
- $time =~ m/^(\d\d)(\w{3})(\d{4})\@(\d\d):(\d\d):(\d\d)/o;
- $g->{$group}->{sec} = timegm($6, $5, $4, $1, $month{$2}, $3-1900);
- $time =~ s/\@/ at /;
- $g->{$group}->{last} = $time;
- push @{ $g->{$group}->{calls} }, $call;
- } else {
- $found = 0;
- foreach (@{ $g->{$group}->{calls} }) {
- if (/$call/) {
- $found = 1;
- last;
+ @chatlog = reverse @chatlog;
+ foreach $row(@chatlog) {
+ ($time, $call, $group) = ($row =~ m/^(\S+) (\S+) -> (\S+) /o);
+ if (!exists $g->{$group}) {
+ $time =~ m/^(\d\d)(\w{3})(\d{4})\@(\d\d):(\d\d):(\d\d)/o;
+ $g->{$group}->{sec} = timegm($6, $5, $4, $1, $month{$2}, $3-1900);
+ $time =~ s/\@/ at /;
+ $g->{$group}->{last} = $time;
+ push @{ $g->{$group}->{calls} }, $call;
+ }
+ else {
+ $found = 0;
+ foreach (@{ $g->{$group}->{calls} }) {
+ if (/$call/) {
+ $found = 1;
+ last;
+ }
+ }
+ push @{ $g->{$group}->{calls} }, $call unless $found;