mirror of
				https://github.com/fluffle/goirc
				synced 2025-10-31 02:08:03 +00:00 
			
		
		
		
	Oops, missed a bit.
This commit is contained in:
		
							parent
							
								
									111a23d87c
								
							
						
					
					
						commit
						7be7e79c78
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		|  | @ -72,9 +72,15 @@ func (st *stateTracker) GetNick(n string) *Nick { | |||
| func (st *stateTracker) ReNick(old, neu string) { | ||||
| 	if nk, ok := st.nicks[old]; ok { | ||||
| 		if _, ok := st.nicks[neu]; !ok { | ||||
| 			st.nicks[old] = nil, false | ||||
| 			nk.Nick = neu | ||||
| 			st.nicks[old] = nil, false | ||||
| 			st.nicks[neu] = nk | ||||
| 			for ch, _ := range nk.chans { | ||||
| 				// We also need to update the lookup maps of all the channels | ||||
| 				// the nick is on, to keep things in sync. | ||||
| 				ch.lookup[old] = nil, false | ||||
| 				ch.lookup[neu] = nk | ||||
| 			} | ||||
| 		} else { | ||||
| 			logging.Warn("StateTracker.ReNick(): %s already exists.", neu) | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue