Created
August 2, 2021 17:13
-
-
Save Aketzu/b27443c595b90b09d277fbed356a54a0 to your computer and use it in GitHub Desktop.
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
# cleanzwsp.pl | |
# | |
# Cleans zero width spaces from text | |
# | |
use strict; | |
use vars qw($VERSION %IRSSI); | |
use Irssi; | |
$VERSION = '1.00'; | |
%IRSSI = ( | |
authors => 'Anssi Kolehmainen', | |
contact => '[email protected]', | |
name => 'cleanzwsp', | |
description => 'Cleans zero-width spaces from text', | |
license => 'Public Domain', | |
url => 'http://aketzu.net', | |
changed => '2 August 2021 19:45:00', | |
); | |
sub cleanzwsp_message { | |
$_[1] =~ s/\x{200B}//g; | |
$_[1] =~ s/\xE2\x80\x8B//g; | |
Irssi::signal_continue(@_); | |
} | |
Irssi::signal_add('event privmsg', 'cleanzwsp_message'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment