예제 #1
0
// checkAccount processes the current input as the player's account. If it is
// empty we ask again for the account otherwise we move on to asking for the
// password.
func (l *login) checkAccount() {

	if l.input == "" {
		l.next = l.newAccount()
		return
	}

	l.account = player.HashAccount(l.input)
	l.needPassword()
}
예제 #2
0
func (a *account) checkAccount() {
	len := utf8.RuneCountInString(a.input)
	min := config.AccountIdMin

	if len < min {
		a.Respond("[RED]You only entered %d characters, minimum length is %d characters.", len, min)
		a.needAccount()
		return
	}

	a.account = player.HashAccount(a.input)
	a.explainPassword()
}