diff --git a/scripts/banner.pl b/scripts/banner.pl index f85dc84..97cca29 100644 --- a/scripts/banner.pl +++ b/scripts/banner.pl @@ -9,378 +9,6 @@ my $SCRIPT_LICENCE = 'Public domain'; my $SCRIPT_DESC = 'Banner text'; our (%queue, %timer); -our @chars = (' -````````^', -' -XX``XXXXX', -' -``````XXX -````````` -``````XXX', -' -``X```X`` -XXXXXXXXX -``X```X`` -XXXXXXXXX -``X```X``', -' -`````XX`` -`X``X``X` -XX``X``XX -`X``X``X` -``XX`````', -' -```X```XX -XX``X``XX -XX```X```', -' -```X`X``` -X`X`X`X`X -``X```X``', -' -``````XXX', -' -`XXXXXXX` -X```````X', -' -X```````X -`XXXXXXX`', -' -``````X`X -```````X` -``````X`X', -' -````X```` -```XXX``` -````X````', -' -X```````` -`XX``````', -' -````X```^ -````X````', -' -X````````', -' -XXX`````` -```XXX``` -``````XXX', -' -`XXXXXXX` -X```````X -`XXXXXXX`', -' -X``````X` -XXXXXXXXX -X````````', -' -XXX````X` -X``XX```X -X````XXX`', -' -`X`````X` -X```X```X -`XXX`XXX`', -' -````XXX`` -````X``X` -XXXXXXXXX', -' -X```XXXXX -X```X```X -`XXX````X', -' -`XXXXXXX` -X```X```X -`XXX`````', -' -XXX`````X -```XXX``X -``````XXX', -' -`XXX`XXX` -X```X```X -`XXX`XXX`', -' -`````XXX` -X```X```X -`XXXXXXX`', -' -``XX`XX``', -' -`X``````` -``XX`XX``', -' -````X```` -```X`X``` -``X```X``', -' -```X`X``` -```X`X``^ -```X`X```', -' -``X```X`` -```X`X``` -````X````', -' -```````X` -XX``X```X -`````XXX`', -' -`XXXXXXX` -X``XXX``X -X`X```X`X -X`XXXXXXX', -' -XXXXXXXX` -````X```X -XXXXXXXX`', -' -XXXXXXXXX -X```X```X -`XXX`XXX`', -' -`XXXXXXX` -X```````X -`X`````X`', -' -XXXXXXXXX -X```````X -`XXXXXXX`', -' -XXXXXXXXX -X```X```X -X```````X', -' -XXXXXXXXX -````X```X -````````X', -' -`XXXXXXX` -X```````X -`XXX```X`', -' -XXXXXXXXX -````X```` -XXXXXXXXX', -' -X```````X -XXXXXXXXX -X```````X', -' -`X``````X -X```````X -`XXXXXXXX', -' -XXXXXXXXX -````X```` -```X`X``` -XXX```XXX', -' -XXXXXXXXX -X````````', -' -XXXXXXXXX -``````XX` -``XXXX``` -``````XX` -XXXXXXXXX', -' -XXXXXXXXX -``````XX` -```XXX``` -`XX`````` -XXXXXXXXX', -' -XXXXXXXXX -X```````X -XXXXXXXXX', -' -XXXXXXXXX -````X```X -`````XXX`', -' -`XXXXXXXX -XX``````X -XXXXXXXXX -X````````', -' -XXXXXXXXX -````X```X -XXXX`XXX`', -' -`X```XXX` -X```X```X -`XXX```X`', -' -````````X -XXXXXXXXX -````````X', -' -XXXXXXXXX -X```````` -XXXXXXXXX', -' -```XXXXXX -XXX`````` -```XXXXXX', -' -`XXXXXXXX -X```````` -`XXXX```` -X```````` -`XXXXXXXX', -' -XXX```XXX -```XXX``` -XXX```XXX', -' -`````XXXX -XXXXX```` -`````XXXX', -' -XXX`````X -X``XXX``X -X`````XXX', -' -XXXXXXXXX -X```````X', -' -``````XXX -```XXX``` -XXX``````', -' -X```````X -XXXXXXXXX', -' -```````X` -````````X -```````X`', -' -X```````` -X```````^ -X````````', -' -````````X -```````X`', -' -`X``X```` -X`X`X```` -XXXX`````', -' -XXXXXXXXX -X```X```` -`XXX`````', -' -`XXX````` -X```X```` -X```X````', -' -`XXX````` -X```X```` -XXXXXXXXX', -' -`XXX````` -X`X`X```` -X`XX`````', -' -XXXXXXXX` -````X```X', -' -X``X````` -X`X`X```` -`XXXX````', -' -XXXXXXXXX -````X```` -XXXX`````', -' -XXXXX``X`', -' -X```````` -`XXXX``X`', -' -XXXXXXXXX -````X```` -XXXX`X```', -' -X```````X -XXXXXXXXX -X````````', -' -XXXXX```` -````X```` -XXXX````` -````X```` -XXXX`````', -' -XXXXX```` -````X```` -XXXX`````', -' -XXXXX```` -X```X```` -XXXXX````', -' -XXXXX```` -`X``X```` -``XX`````', -' -``XX````` -`X``X```` -XXXXX````', -' -XXXXX```` -````X````', -' -X``X````` -X`X`X```` -`X``X````', -' -`XXXXXXX` -X```X````', -' -`XXXX```` -X```````` -XXXXX````', -' -``XXX```` -XX``````` -``XXX````', -' -`XXXX```` -X```````` -`XXX````` -X```````` -`XXXX````', -' -XX`XX```` -``X`````` -XX`XX````', -' -X``XX```` -X`X`````` -`XXXX````', -' -XX``X```` -X`X`X```` -X``XX````', -' -````X```` -XXXX`XXXX -X```````X', -' -XXXXXXXXX', -' -X```````X -XXXX`XXXX -````X````', -' -```````X` -````````X -```````X` -````````X'); - if (weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION, $SCRIPT_LICENCE, $SCRIPT_DESC, '', '')) { weechat::hook_command('banner', 'Banner text', @@ -400,14 +28,290 @@ sub cmd_banner my $nick = weechat::info_get('irc_nick', weechat::buffer_get_string($buffer, 'localvar_server')); +my @chars = ('````````^', +'XX``XXXXX', +'``````XXX +````````` +``````XXX', +'``X```X`` +XXXXXXXXX +``X```X`` +XXXXXXXXX +``X```X``', +'`````XX`` +`X``X``X` +XX``X``XX +`X``X``X` +``XX`````', +'```X```XX +XX``X``XX +XX```X```', +'```X`X``` +X`X`X`X`X +``X```X``', +'``````XXX', +'`XXXXXXX` +X```````X', +'X```````X +`XXXXXXX`', +'``````X`X +```````X` +``````X`X', +'````X```` +```XXX``` +````X````', +'X```````` +`XX``````', +'````X```^ +````X````', +'X````````', +'XXX`````` +```XXX``` +``````XXX', +'`XXXXXXX` +X```````X +`XXXXXXX`', +'X``````X` +XXXXXXXXX +X````````', +'XXX````X` +X``XX```X +X````XXX`', +'`X`````X` +X```X```X +`XXX`XXX`', +'````XXX`` +````X``X` +XXXXXXXXX', +'X```XXXXX +X```X```X +`XXX````X', +'`XXXXXXX` +X```X```X +`XXX`````', +'XXX`````X +```XXX``X +``````XXX', +'`XXX`XXX` +X```X```X +`XXX`XXX`', +'`````XXX` +X```X```X +`XXXXXXX`', +'``XX`XX``', +'`X``````` +``XX`XX``', +'````X```` +```X`X``` +``X```X``', +'```X`X``` +```X`X``^ +```X`X```', +'``X```X`` +```X`X``` +````X````', +'```````X` +XX``X```X +`````XXX`', +'`XXXXXXX` +X``XXX``X +X`X```X`X +X`XXXXXXX', +'XXXXXXXX` +````X```X +XXXXXXXX`', +'XXXXXXXXX +X```X```X +`XXX`XXX`', +'`XXXXXXX` +X```````X +`X`````X`', +'XXXXXXXXX +X```````X +`XXXXXXX`', +'XXXXXXXXX +X```X```X +X```````X', +'XXXXXXXXX +````X```X +````````X', +'`XXXXXXX` +X```````X +`XXX```X`', +'XXXXXXXXX +````X```` +XXXXXXXXX', +'X```````X +XXXXXXXXX +X```````X', +'`X``````X +X```````X +`XXXXXXXX', +'XXXXXXXXX +````X```` +```X`X``` +XXX```XXX', +'XXXXXXXXX +X````````', +'XXXXXXXXX +``````XX` +``XXXX``` +``````XX` +XXXXXXXXX', +'XXXXXXXXX +``````XX` +```XXX``` +`XX`````` +XXXXXXXXX', +'XXXXXXXXX +X```````X +XXXXXXXXX', +'XXXXXXXXX +````X```X +`````XXX`', +'`XXXXXXXX +XX``````X +XXXXXXXXX +X````````', +'XXXXXXXXX +````X```X +XXXX`XXX`', +'`X```XXX` +X```X```X +`XXX```X`', +'````````X +XXXXXXXXX +````````X', +'XXXXXXXXX +X```````` +XXXXXXXXX', +'```XXXXXX +XXX`````` +```XXXXXX', +'`XXXXXXXX +X```````` +`XXXX```` +X```````` +`XXXXXXXX', +'XXX```XXX +```XXX``` +XXX```XXX', +'`````XXXX +XXXXX```` +`````XXXX', +'XXX`````X +X``XXX``X +X`````XXX', +'XXXXXXXXX +X```````X', +'``````XXX +```XXX``` +XXX``````', +'X```````X +XXXXXXXXX', +'```````X` +````````X +```````X`', +'X```````` +X```````^ +X````````', +'````````X +```````X`', +'`X``X```` +X`X`X```` +XXXX`````', +'XXXXXXXXX +X```X```` +`XXX`````', +'`XXX````` +X```X```` +X```X````', +'`XXX````` +X```X```` +XXXXXXXXX', +'`XXX````` +X`X`X```` +X`XX`````', +'XXXXXXXX` +````X```X', +'X``X````` +X`X`X```` +`XXXX````', +'XXXXXXXXX +````X```` +XXXX`````', +'XXXXX``X`', +'X```````` +`XXXX``X`', +'XXXXXXXXX +````X```` +XXXX`X```', +'X```````X +XXXXXXXXX +X````````', +'XXXXX```` +````X```` +XXXX````` +````X```` +XXXX`````', +'XXXXX```` +````X```` +XXXX`````', +'XXXXX```` +X```X```` +XXXXX````', +'XXXXX```` +`X``X```` +``XX`````', +'``XX````` +`X``X```` +XXXXX````', +'XXXXX```` +````X````', +'X``X````` +X`X`X```` +`X``X````', +'`XXXXXXX` +X```X````', +'`XXXX```` +X```````` +XXXXX````', +'``XXX```` +XX``````` +``XXX````', +'`XXXX```` +X```````` +`XXX````` +X```````` +`XXXX````', +'XX`XX```` +``X`````` +XX`XX````', +'X``XX```` +X`X`````` +`XXXX````', +'XX``X```` +X`X`X```` +X``XX````', +'````X```` +XXXX`XXXX +X```````X', +'XXXXXXXXX', +'X```````X +XXXX`XXXX +````X````', +' ```````X` +````````X +```````X` +````````X'); + for ($flag) { /-nick/ and $prefix = '/nick', last; /-key/ and $prefix = '/mode +k', last; /-limit/ and $prefix = '/mode +l', last; } - if ($flag eq '-limit') { @chars[$_] =~ y/`X/18/ for (0 .. @chars) } - else { @chars[$_] =~ y/18/`X/ for (0 .. @chars) } + if ($flag eq '-limit') { $chars[$_] =~ y/`X/18/ for (0 .. (@chars - 1)) } for my $char (split //, $text) { push @output, $flag eq '-limit' ? '111111111' : '`````````';