diff options
author | Teddy Wing | 2018-02-14 22:13:07 +0100 |
---|---|---|
committer | Teddy Wing | 2018-02-14 22:13:07 +0100 |
commit | 74e886839e669b29b540113a3ace6ea779acbda3 (patch) | |
tree | 43421c919e5c465b9dd0210d2bbd8e8af2f04e4a | |
parent | b8f971b65d1e3abc7a5734844f94367dfec3e67d (diff) | |
download | irssi-dimpid-74e886839e669b29b540113a3ace6ea779acbda3.tar.bz2 |
Change colour escape codes to constants
Make this more readable by using constants in place of the actual escape
codes.
-rw-r--r-- | dimpid.pl | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -12,10 +12,18 @@ our %IRSSI = { }; +use constant ESCAPE => "\x{03}"; +use constant GREY => '14'; + Irssi::signal_add('message public', sub { my ($server, $text, $nick, @rest) = @_; if ($nick eq 'test-3kj469y5h') { - Irssi::signal_continue($server, "\x{03}14" . $text . "\x{03}", $nick, @rest); + Irssi::signal_continue( + $server, + ESCAPE . GREY . $text . ESCAPE, + $nick, + @rest, + ); } }); |