aboutsummaryrefslogtreecommitdiff
path: root/lib/IRC/Client.pm6
diff options
context:
space:
mode:
authorAleks-Daniel Jakimenko-Aleksejev <alex.jakimenko@gmail.com>2019-04-12 18:08:15 +0300
committerGitHub <noreply@github.com>2019-04-12 18:08:15 +0300
commit7d060c7983a0d8e5d5092dc7d88d5f1b8a7577a7 (patch)
tree2c18ce8a3bc3f84d51d3351c6b7fe3abd1eda951 /lib/IRC/Client.pm6
parent590379beaaf8fbf525c9f14d0f34116ed20f6ea3 (diff)
parentb8f67601e0086d7a2403e4f47ca720e3df3c5365 (diff)
Merge pull request #61 from Tyil/reply-no-prefix
Add an option to not automatically prefix replies with a user's nick
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r--lib/IRC/Client.pm64
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index cd2348e..f0bc7a8 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -21,6 +21,7 @@ has $.debug;
has Lock $!lock = Lock.new;
has Channel $!event-pipe = Channel.new;
has Channel $!socket-pipe = Channel.new;
+has Bool $.autoprefix = True;
my &colored = (try require Terminal::ANSIColor) === Nil
&& sub (Str $s, $) { $s } ||
@@ -44,9 +45,12 @@ submethod BUILD (
Str:D :$userhost = 'localhost',
Str:D :$userreal = 'Perl6 IRC Client',
:$channels = ('#perl6',),
+ Bool:D :$autoprefix = True,
) {
@!filters = @$filters;
@!plugins = @$plugins;
+ $!autoprefix = $autoprefix;
+
my %servers = %$servers;
my %all-conf = :$port, :$password, :$host, :$nick, :$alias,