parent
e5b978dbf5
commit
d09db4ddce
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue