aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/IRC/Client.pm63
-rw-r--r--lib/IRC/Client/Server.pm62
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index f2f73a7..486bfcd 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -75,7 +75,8 @@ submethod BUILD (
}
method join (*@channels, :$server) {
- self.send-cmd: 'JOIN', $_, :$server for @channels;
+ self.send-cmd: 'JOIN', ($_ ~~ Pair ?? .kv !! .Str), :$server
+ for @channels;
self;
}
diff --git a/lib/IRC/Client/Server.pm6 b/lib/IRC/Client/Server.pm6
index 1857fcc..f438d6d 100644
--- a/lib/IRC/Client/Server.pm6
+++ b/lib/IRC/Client/Server.pm6
@@ -1,6 +1,6 @@
unit class IRC::Client::Server;
-has @.channels where .all ~~ Str;
+has @.channels where .all ~~ Str|Pair;
has @.nick where .all ~~ Str;
has Int $.port where 0 <= $_ <= 65535;
has Str $.label;