diff options
Diffstat (limited to 'lib/IRC/Client.pm6')
-rw-r--r-- | lib/IRC/Client.pm6 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6 index 4ec67a5..1b616ce 100644 --- a/lib/IRC/Client.pm6 +++ b/lib/IRC/Client.pm6 @@ -370,11 +370,16 @@ method !ssay (Str:D $msg, :$server is copy) { ############################################################################### ############################################################################### -sub debug-print (Str() $str, :$in, :$out, :$sys, :$server) { +sub debug-print ($str, :$in, :$out, :$sys, :$server) { my $server-str = $server ?? colored(~$server, 'bold white on_cyan') ~ ' ' !! ''; - my @bits = $str.split: ' '; + my @bits = ( + $str ~~ IRC::Client::Message::Privmsg|IRC::Client::Message::Notice + ?? ":$str.usermask() $str.command() $str.args()[]" + !! $str.Str + ).split: ' '; + if $in { my ($pref, $cmd) = 0, 1; if @bits[0] eq '❚⚠❚' { |