Created
February 6, 2012 17:49
-
-
Save ryands/1753636 to your computer and use it in GitHub Desktop.
Strip ZNC playback from irssi logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Process logs for stats | |
my $znc_playback = 0; | |
while (my $line = <>) { | |
if($line =~ /^[0-9]{1,2}:[0-9]{1,2} < \*\*\*> Buffer Playback\.\.\.$/) { | |
$znc_playback = 1; | |
} elsif($line =~ /^[0-9]{1,2}:[0-9]{1,2} < \*\*\*> Playback Complete\.$/) { | |
$znc_playback = 0; | |
} else { | |
print $line unless $znc_playback; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment