/usr/share/irssi/scripts/washnicks.pl is in irssi-scripts 20120326.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # washnicks.pl
#
# Removes annoying characters from nicks
#
# TODO:
# - Don't use the function if only the first letter is upper case
#
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '1.01';
%IRSSI = (
authors => 'ulbkold',
contact => 'solaris@sundevil.de',
name => 'washnicks',
description => 'Removes annoying characters from nicks',
license => 'GPL',
url => 'n/a',
changed => '12 April 2002 14:44:11',
);
# Channel list
my @channels = ('#fof');
#main event handler
sub wash_nick {
my ($server, $data, $nick, $address, $target) = @_;
my ($channel, $msg) = split(/ :/, $data,2);
# if the current channel is in the list...
for (@channels) {
if ($_ eq $channel) {
# ... check the nick
# if the nick contains one of these characters or upper case letters
# enter the changing function
if ( $nick =~/[A-Z]|\||\\|\]|\[|\^|-|\`|3|0|1|4|_/ ) {
$nick =~ s/\|//;
$nick =~ s/\\//;
$nick =~ s/\]//;
$nick =~ s/\[//;
$nick =~ s/\^//;
$nick =~ s/-//;
$nick =~ s/-//;
$nick =~ s/\`//;
$nick =~ s/3/e/;
$nick =~ s/0/O/;
$nick =~ s/1/i/;
$nick =~ s/4/a/;
$nick = lc($nick);
# emit signal
Irssi::signal_emit("event privmsg", $server, $data,
$nick, $address, $target);
#and stop
Irssi::signal_stop();
}
}
}
}
Irssi::signal_add('event privmsg', 'wash_nick');
|