mirror of
https://github.com/fluffle/goirc
synced 2025-06-07 07:13:20 +00:00
don't add spaces and instead make message optional, let the user decide
This commit is contained in:
parent
f6a94cc3a3
commit
46ce56c580
1 changed files with 3 additions and 3 deletions
|
@ -293,10 +293,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 capability
|
// CAP capability
|
||||||
func (conn *Conn) Cap(subcommmand string, messages ...string) {
|
func (conn *Conn) Cap(subcommmand string, message ...string) {
|
||||||
if len(messages) == 0 {
|
if len(message) == 0 {
|
||||||
conn.Raw(CAP + " " + subcommmand)
|
conn.Raw(CAP + " " + subcommmand)
|
||||||
} else {
|
} else {
|
||||||
conn.Raw(CAP + " " + subcommmand + " :" + strings.Join(messages, " "))
|
conn.Raw(CAP + " " + subcommmand + " :" + message[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue