mirror of https://github.com/fluffle/goirc
use a list of capabilities instead, as the spec defines space seperated caps
This commit is contained in:
parent
32ae1211bb
commit
73f523f252
|
@ -294,10 +294,10 @@ func (conn *Conn) Pong(message string) { conn.Raw(PONG + " :" + message) }
|
||||||
// Cap sends a CAP command to the server.
|
// Cap sends a CAP command to the server.
|
||||||
// CAP subcommand
|
// CAP subcommand
|
||||||
// CAP subcommand :message
|
// CAP subcommand :message
|
||||||
func (conn *Conn) Cap(subcommmand string, message ...string) {
|
func (conn *Conn) Cap(subcommmand string, capabilities ...string) {
|
||||||
if len(message) == 0 {
|
if len(capabilities) == 0 {
|
||||||
conn.Raw(CAP + " " + subcommmand)
|
conn.Raw(CAP + " " + subcommmand)
|
||||||
} else {
|
} else {
|
||||||
conn.Raw(CAP + " " + subcommmand + " :" + message[0])
|
conn.Raw(CAP + " " + subcommmand + " :" + strings.Join(capabilities, " "))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue