#!/usr/bin/perl use strict; use warnings; use File::Spec (); BEGIN { use lib File::Spec->catdir( Xchat::get_info('xchatdir'), 'lib' ); } use N0i::Xchat::Scramble; my $scrambler = N0i::Xchat::Scramble->new or die "Fucked up. :(\n"; $scrambler->register; $scrambler->set_hooks( [ 'command', 'scramble', sub { my ($txt, $error) = $scrambler->scramble($_[1]->[1]); if ($error) { Xchat::print('ERROR: ' . $error); } else { Xchat::command("say $txt"); } Xchat::EAT_ALL; }, { help_text => "\x02 scramble \x02 <\x02blah blah\x02> - text to scramble" } ] ); $scrambler->loaded;