func (ns *NickSelector) GetNick() string {
	// select the next nick
	if ns.firstrundone {
		ns.selectedNick++
		if ns.selectedNick == len(ns.nicks) {
			ns.selectedNick = 0
			ns.nickLoopCount++
		}
	} else {
		ns.firstrundone = true
	}

	// add at least one nick
	if len(ns.nicks) == 0 && len(ns.nicks) == 0 {
		ns.nicks = []string{"user"}
	}

	// populate nicks
	if ns.selectedNick == 0 && ns.nickLoopCount == 0 && 0 < len(ns.nicks) {
		for _, nick := range ns.nicks {
			ns.nicks = append(ns.nicks, nick)
		}
		// sort
		if !ns.RandomNickOrder {
			sort.Strings(ns.nicks)
		}
	}

	// randomise
	if ns.selectedNick == 0 && ns.RandomNickOrder && 0 < len(ns.nicks) {
		shuffle(ns.nicks)
	}

	// get the actual nick
	baseNick := ns.nicks[ns.selectedNick]

	// munge the nickname as appropriate
	if ns.nickLoopCount < 5 && 0.3 < rand.Float64() {
		for i := 0; i < ns.nickLoopCount; i++ {
			baseNick += "_"
		}
	} else if ns.nickLoopCount < 5 && 0.3 < rand.Float64() {
		for i := 0; i < ns.nickLoopCount; i++ {
			baseNick += "-"
		}
	} else {
		baseNick += strconv.Itoa(ns.nickLoopCount)
	}

	return baseNick
}
// GetNick returns a nickname from the selector.
GetNick returns a nickname from the selector.
// GetNick returns a nickname from the selector .
func (ns *NickSelector) GetNick() string {
	if ns.firstrundone {
		ns.selectedNick++
		if ns.selectedNick == len(ns.nicks) {
			ns.selectedNick = 0
			ns.nickLoopCount++
		}
	} else {
		ns.firstrundone = true
	}
	if len(ns.nicks) == 0 && len(ns.nicks) == 0 {
		ns.nicks = []string{"user"}
	}
	if ns.selectedNick == 0 && ns.nickLoopCount == 0 && 0 < len(ns.nicks) {
		for _, nick := range ns.nicks {
			ns.nicks = append(ns.nicks, nick)
		}
		if !ns.RandomNickOrder {
			sort.Strings(ns.nicks)
		}
	}
	if ns.selectedNick == 0 && ns.RandomNickOrder && 0 < len(ns.nicks) {
		shuffle(ns.nicks)
	}
	baseNick := ns.nicks[ns.selectedNick]
	if ns.nickLoopCount < 5 && 0.3 < rand.Float64() {
		for i := 0; i < ns.nickLoopCount; i++ {
			baseNick += "_"
		}
	} else if ns.nickLoopCount < 5 && 0.3 < rand.Float64() {
		for i := 0; i < ns.nickLoopCount; i++ {
			baseNick += "-"
		}
	} else {
		baseNick += strconv.Itoa(ns.nickLoopCount)
	}
	return baseNick
}
func ( ns * NickSelector ) GetNick ( ) string { if ns . firstrundone { ns . selectedNick ++ if ns . selectedNick == len ( ns . nicks ) { ns . selectedNick = 0 ns . nickLoopCount ++ } } else { ns . firstrundone = true } if len ( ns . nicks ) == 0 && len ( ns . nicks ) == 0 { ns . nicks = [ ] string { " " } } if ns . selectedNick == 0 && ns . nickLoopCount == 0 && 0 < len ( ns . nicks ) { for _ , nick := range ns . nicks { ns . nicks = append ( ns . nicks , nick ) } if ! ns . RandomNickOrder { sort . Strings ( ns . nicks ) } } if ns . selectedNick == 0 && ns . RandomNickOrder && 0 < len ( ns . nicks ) { shuffle ( ns . nicks ) } baseNick := ns . nicks [ ns . selectedNick ] if ns . nickLoopCount < 5 && 0.3 < rand . Float64 ( ) { for i := 0 ; i < ns . nickLoopCount ; i ++ { baseNick += " " } } else if ns . nickLoopCount < 5 && 0.3 < rand . Float64 ( ) { for i := 0 ; i < ns . nickLoopCount ; i ++ { baseNick += " " } } else { baseNick += strconv . Itoa ( ns . nickLoopCount ) } return baseNick }
GetNick returns a nickname from the selector.
GetNick returns a nickname from the selector .
// select the next nick // add at least one nick // populate nicks // sort // randomise // get the actual nick // munge the nickname as appropriate