Clean and clarify

Signed-off-by: Etzelia <etzelia@hotmail.com>
rate-insult
Etzelia 2020-06-11 01:05:33 -05:00
parent e5b978dbf5
commit d09db4ddce
No known key found for this signature in database
GPG Key ID: 708511AE7ABC5314
1 changed files with 3 additions and 6 deletions

View File

@ -39,26 +39,23 @@ func init() {
var accepted bool
if len(players) > 0 {
nickname = players[0].Username
if len(apps) > 0 {
accepted = apps[0].Accepted
} else {
if len(apps) == 0 {
apps, err = models.Application(models.NewDjangoBuilder().Exact(django.ApplicationID, fmt.Sprintf("%d", players[0].ApplicationID)))
if len(apps) == 0 {
return errors.New("something hecked up, please contact staff")
}
accepted = apps[0].Accepted
}
} else if len(apps) > 0 {
accepted = apps[0].Accepted
if accepted {
return errors.New("please join the server and then re-try this command")
}
} else {
return errors.New("no player or applications found for that username")
}
accepted = apps[0].Accepted
if !accepted {
return errors.New("sorry, your application was denied")
return errors.New("sorry, your application was denied or is still in review")
}
// Accepted