Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions old/gay.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
# is very well-received !"
# -- Some Sucker
#
# "An ocassional swastika, if rainbow-colored or used in relation
# to Linus Torvalds can't really do any harm."
# -- Silvester Standalone
#
# credits:
# ben for banner leetness
# Pi for the popeye filter
Expand All @@ -18,6 +22,7 @@
# uke for the inspiration for the checker
# hlprmnky for the jigs and for debugging
# various stolen things: emacs spook file, jwz's scrambler script
# UTF-8 support by lkundrak@v3.sk, with funding from U.S. defense department
#
# (this whole thing needs to be rewritten)
#
Expand Down Expand Up @@ -55,6 +60,7 @@
use Unicode::Normalize;
use Text::Wrap;
use IPC::Open3;
use Encode;
use vars qw/$VERSION %IRSSI $SPLASH $NAME $CONTEXT $OUTPUT/;
use vars qw/$BASH_PROMPT $ANSI/;

Expand Down Expand Up @@ -163,6 +169,7 @@ sub cprint {
sine_frequency => "0.3",
sine_background => " ",
banner_style => "phrase",
encoding => "UTF-8",
};

# wrap settings routines.. irssi cares about type
Expand Down Expand Up @@ -752,6 +759,9 @@ sub process {
my $cowfile = settings_get_str("cowfile");
my $figfont = settings_get_str("figfont");
my $banstyle = settings_get_str("banner_style");
my $encoding = settings_get_str("encoding");

$text = decode($encoding, $text) if $encoding;

my $sendto = $dest->{name} if $dest;

Expand Down Expand Up @@ -3494,6 +3504,7 @@ sub strip {
Irssi::settings_add_int($IRSSI{name}, 'spook_words', $settings->{spook_words});
Irssi::settings_add_int($IRSSI{name}, 'hug_size', $settings->{hug_size});
Irssi::settings_add_str($IRSSI{name}, 'banner_style', $settings->{banner_style});
Irssi::settings_add_str($IRSSI{name}, 'encoding', $settings->{encoding});

cprint("$SPLASH. '/$NAME help' for usage");
}
Expand Down