mirror of
				https://github.com/fluffle/goirc
				synced 2025-11-04 12:08:03 +00:00 
			
		
		
		
	Fix a bug that prevented adding multiple handlers
This commit is contained in:
		
							parent
							
								
									7515f11470
								
							
						
					
					
						commit
						036cc4c3eb
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,7 @@ func (conn *Conn) AddHandler(name string, f func(*Conn, *Line)) {
 | 
			
		|||
		}
 | 
			
		||||
		e = e[0 : len(e)+1]
 | 
			
		||||
		e[len(e)-1] = f
 | 
			
		||||
		conn.events[n] = e
 | 
			
		||||
	} else {
 | 
			
		||||
		e := make([]func(*Conn, *Line), 1, 10)
 | 
			
		||||
		e[0] = f
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue