aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-14 22:13:07 +0100
committerTeddy Wing2018-02-14 22:13:07 +0100
commit74e886839e669b29b540113a3ace6ea779acbda3 (patch)
tree43421c919e5c465b9dd0210d2bbd8e8af2f04e4a
parentb8f971b65d1e3abc7a5734844f94367dfec3e67d (diff)
downloadirssi-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.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/dimpid.pl b/dimpid.pl
index ca32c6d..78db3f6 100644
--- a/dimpid.pl
+++ b/dimpid.pl
@@ -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,
+ );
}
});