From 4de929f87ba2bf90177ac03d8df6b708c4acb73d Mon Sep 17 00:00:00 2001 From: Serge van Ginderachter Date: Tue, 25 Nov 2014 21:00:23 +0100 Subject: fnotify.pl: Strip non-parsed left over codes (Bitlbee otr messages) Signed-off-by: Serge van Ginderachter --- scripts/fnotify.pl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/fnotify.pl b/scripts/fnotify.pl index 58b2957..f53205e 100644 --- a/scripts/fnotify.pl +++ b/scripts/fnotify.pl @@ -1,11 +1,11 @@ use strict; use vars qw($VERSION %IRSSI); - use Irssi; -$VERSION = '0.0.4'; + +$VERSION = '0.0.5'; %IRSSI = ( name => 'fnotify', - authors => 'Thorsten Leemhuis, James Shubin', + authors => 'Thorsten Leemhuis, James Shubin, Serge van Ginderachter', description => 'Write notifications to a file in a consistent format.', license => 'GNU General Public License', ); @@ -22,10 +22,17 @@ $VERSION = '0.0.4'; # # AUTHORS # +# Strip non-parsed left over codes (Bitlbee otr messages) +# version: 0.0.5 +# Serge van Ginderachter +# # Consistent output formatting by James Shubin: +# version: 0.0.4 # https://ttboj.wordpress.com/ +# note: changed license back to original GPL from Thorsten Leemhuis (svg) # -# Modified from the Thorsten Leemhuis version: +# Modified from the Thorsten Leemhuis +# version: 0.0.3 # http://www.leemhuis.info/files/fnotify/fnotify # # In parts based on knotify.pl 0.1.1 by Hugo Haas: @@ -43,8 +50,9 @@ $VERSION = '0.0.4'; # sub priv_msg { my ($server, $msg, $nick, $address, $target) = @_; + my $msg_stripped = Irssi::strip_codes($msg); my $network = $server->{tag}; - filewrite('' . $network . ' ' . $nick . ' ' . $msg); + filewrite('' . $network . ' ' . $nick . ' ' . $msg_stripped); } # -- cgit v1.2.3