aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-04-19 17:59:36 +1000
committeronefang2020-04-19 17:59:36 +1000
commit61a660d97d1652180474078293cdb5cfc40e2f4e (patch)
tree9b077885a2d92e3a6014a61fe0befccfb36051d8
parentApply CSS colours and fonts to all the widget types. (diff)
downloadopensim-SC_OLD-61a660d97d1652180474078293cdb5cfc40e2f4e.zip
opensim-SC_OLD-61a660d97d1652180474078293cdb5cfc40e2f4e.tar.gz
opensim-SC_OLD-61a660d97d1652180474078293cdb5cfc40e2f4e.tar.bz2
opensim-SC_OLD-61a660d97d1652180474078293cdb5cfc40e2f4e.tar.xz
Actually validate their age.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 998c679..069f5de 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -4014,11 +4014,22 @@ static int DoBValidate(reqData *Rd, inputForm *iF, inputValue *iV)
4014 else 4014 else
4015 { 4015 {
4016 i = atoi(t0); 4016 i = atoi(t0);
4017// TODO - get this to use current year instead of 2020.
4017 if ((1900 > i) || (i > 2020)) 4018 if ((1900 > i) || (i > 2020))
4018 { 4019 {
4019 bitch(Rd, "Please supply a year of birth.", "Out of range."); 4020 bitch(Rd, "Please supply a year of birth.", "Out of range.");
4020 ret++; 4021 ret++;
4021 } 4022 }
4023 else if (i < 1901)
4024 {
4025 bitch(Rd, "Please supply a proper year of birth.", "Out of range, too old.");
4026 ret++;
4027 }
4028 else if (i >2004)
4029 {
4030 bitch(Rd, "This grid is Adult rated, you are too young.", "Out of range, too young.");
4031 ret++;
4032 }
4022 } 4033 }
4023 t1 = (char *) (iV + 1)->value; 4034 t1 = (char *) (iV + 1)->value;
4024 if ((NULL == t1) || ('\0' == t1[0])) 4035 if ((NULL == t1) || ('\0' == t1[0]))