forked from External/ergo
pointless refactor of stripMaskFromNick
This commit is contained in:
parent
853bb12c29
commit
15a0cda78b
4 changed files with 12 additions and 12 deletions
|
|
@ -308,3 +308,11 @@ func foldPermissive(str string) (result string, err error) {
|
|||
str = norm.NFD.String(str)
|
||||
return str, nil
|
||||
}
|
||||
|
||||
// Reduce, e.g., `alice!~u@host` to `alice`
|
||||
func NUHToNick(nuh string) (nick string) {
|
||||
if idx := strings.IndexByte(nuh, '!'); idx != -1 {
|
||||
return nuh[0:idx]
|
||||
}
|
||||
return nuh
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue