File: topic-diff.pl.diff

package info (click to toggle)
irssi-scripts 20070925
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,708 kB
  • ctags: 2,415
  • sloc: perl: 54,737; makefile: 43; sh: 20
file content (15 lines) | stat: -rw-r--r-- 617 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- topic-diff.pl.orig	2004-02-02 08:11:24.000000000 +0100
+++ scripts/topic-diff.pl	2006-10-09 15:57:51.000000000 +0200
@@ -30,8 +30,10 @@
 #    $server->print ($channel, $server->{tag});
 
     if ($topics{$server->{tag}."_".$channel}) {
-	my @original = split /\s*\|\s*/, $topics{$server->{tag}."_".$channel};
-	my @modified = split /\s*\|\s*/, $topic;
+	$topics{$server->{tag}."_".$channel} =~ s/^ +| +$//g;
+	$topic =~ s/^ +| +$//g;
+	my @original = split /\s*\|\s*|\s+-\s+/, $topics{$server->{tag}."_".$channel};
+	my @modified = split /\s*\|\s*|\s+-\s+/, $topic;
 	
 	
       outer: while( $i <= $#original) {