mirror of
				https://github.com/fluffle/goirc
				synced 2025-10-31 18:28:05 +00:00 
			
		
		
		
	use a list of capabilities instead, as the spec defines space seperated caps
This commit is contained in:
		
							parent
							
								
									32ae1211bb
								
							
						
					
					
						commit
						73f523f252
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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, " ")) | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue