From 73f523f252373cb17a7350424aefa7e15e4c463a Mon Sep 17 00:00:00 2001 From: Jake Bailey Date: Mon, 11 Jan 2016 16:50:32 -0600 Subject: [PATCH] use a list of capabilities instead, as the spec defines space seperated caps --- client/commands.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/commands.go b/client/commands.go index 0e935a5..85cca5f 100644 --- a/client/commands.go +++ b/client/commands.go @@ -294,10 +294,10 @@ func (conn *Conn) Pong(message string) { conn.Raw(PONG + " :" + message) } // Cap sends a CAP command to the server. // CAP subcommand // CAP subcommand :message -func (conn *Conn) Cap(subcommmand string, message ...string) { - if len(message) == 0 { +func (conn *Conn) Cap(subcommmand string, capabilities ...string) { + if len(capabilities) == 0 { conn.Raw(CAP + " " + subcommmand) } else { - conn.Raw(CAP + " " + subcommmand + " :" + message[0]) + conn.Raw(CAP + " " + subcommmand + " :" + strings.Join(capabilities, " ")) } }