forked from Minecraft/canopeas
parent
e5b978dbf5
commit
d09db4ddce
|
@ -39,26 +39,23 @@ func init() {
|
||||||
var accepted bool
|
var accepted bool
|
||||||
if len(players) > 0 {
|
if len(players) > 0 {
|
||||||
nickname = players[0].Username
|
nickname = players[0].Username
|
||||||
if len(apps) > 0 {
|
if len(apps) == 0 {
|
||||||
accepted = apps[0].Accepted
|
|
||||||
} else {
|
|
||||||
apps, err = models.Application(models.NewDjangoBuilder().Exact(django.ApplicationID, fmt.Sprintf("%d", players[0].ApplicationID)))
|
apps, err = models.Application(models.NewDjangoBuilder().Exact(django.ApplicationID, fmt.Sprintf("%d", players[0].ApplicationID)))
|
||||||
if len(apps) == 0 {
|
if len(apps) == 0 {
|
||||||
return errors.New("something hecked up, please contact staff")
|
return errors.New("something hecked up, please contact staff")
|
||||||
}
|
}
|
||||||
accepted = apps[0].Accepted
|
|
||||||
}
|
}
|
||||||
} else if len(apps) > 0 {
|
} else if len(apps) > 0 {
|
||||||
accepted = apps[0].Accepted
|
|
||||||
if accepted {
|
if accepted {
|
||||||
return errors.New("please join the server and then re-try this command")
|
return errors.New("please join the server and then re-try this command")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return errors.New("no player or applications found for that username")
|
return errors.New("no player or applications found for that username")
|
||||||
}
|
}
|
||||||
|
accepted = apps[0].Accepted
|
||||||
|
|
||||||
if !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
|
// Accepted
|
||||||
|
|
Loading…
Reference in New Issue