forked from External/ergo
parent
2e9a0d4b2d
commit
4052cd12fe
9 changed files with 320 additions and 52 deletions
|
|
@ -308,3 +308,16 @@ func (clients *ClientManager) FindAll(userhost string) (set ClientSet) {
|
|||
|
||||
return set
|
||||
}
|
||||
|
||||
// Determine the canonical / unfolded form of a nick, if a client matching it
|
||||
// is present (or always-on).
|
||||
func (clients *ClientManager) UnfoldNick(cfnick string) (nick string) {
|
||||
clients.RLock()
|
||||
c := clients.byNick[cfnick]
|
||||
clients.RUnlock()
|
||||
if c != nil {
|
||||
return c.Nick()
|
||||
} else {
|
||||
return cfnick
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue