use strict; use vars qw($VERSION %IRSSI); $VERSION = "20100122"; %IRSSI = ( authors => "Paul Arthur", contact => "flowerysong00\@yahoo.com", name => "reverse", description => "reverses typed lines", license => "GPLv2", changed => "$VERSION", commands => "reverse" ); use Irssi 20020324; sub cmd_reverse ($$$) { my ($arg, $server, $witem) = @_; if ($witem && ($witem->{type} eq 'CHANNEL' || $witem->{type} eq 'QUERY')) { $witem->command('MSG '.$witem->{name}.' '.reverse($arg)); } else { print CLIENTCRAP "%B>>%n ".reverse($arg); } } Irssi::command_bind('reverse',\&cmd_reverse); #Irssi::signal_add('message public',sub {rot13_decode($_[0], $_[4], $_[1]);} ); #Irssi::signal_add('message own_public',sub {rot13_decode($_[0], $_[2], $_[1]);}); print "%B>>%n ".$IRSSI{name}." ".$VERSION." loaded";