use Irssi; use Irssi::Irc; use strict; use warnings; use vars qw($VERSION %IRSSI); $VERSION="0.0.1"; %IRSSI = ( authors => 'johnny', contact => 'johnny@netvor.sk', name => '1337', description => 'just another 1337-speek script >_>', license => 'BSD', url => 'http://netvor.sk/~johnny/', ); sub cmd_1337 { my ($data, $server, $witem) = @_; if (!$server || !$server->{connected}) { Irssi::print ("not connected"); return; } $_ = $data; s/ever/evah/gi; s/(dobr[^ ,.-]*|good|great)/uber/gi; s/m(e|y)([^a-zA-Z]*)/mi$2/gi; s/ck/x/gi; s/the([^a-zA-Z]*)/teh$1/gi; s/(er|xs)([^a-zA-Z]*)/0r$2/gi; s/ed([^a-zA-Z]*)/d$1/gi; s/an(d|t)([^a-zA-Z]*)/&$2/gi; s/you/j00/gi; s/a/4/gi; s/b/8/gi; s/e/3/gi; s/f/ph/gi; s/g/6/gi; s/i/1/gi; s/l/!/gi; s/o/0/gi; s/s/5/gi; s/t/7/gi; s/y/j/gi; s/s/z/gi; $witem->command("/SAY $_"); } Irssi::command_bind('1337','cmd_1337');