aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl
diff options
context:
space:
mode:
authoronefang2020-03-18 08:03:38 +1000
committeronefang2020-03-18 08:03:38 +1000
commitb24a35ab85fbd25741143afc902868c42df0b363 (patch)
tree57e3856e7aa7eb32b3fa4a051526e8e1045d8bb0 /src/sledjchisl
parentTODO++ and comment clean up. (diff)
downloadopensim-SC_OLD-b24a35ab85fbd25741143afc902868c42df0b363.zip
opensim-SC_OLD-b24a35ab85fbd25741143afc902868c42df0b363.tar.gz
opensim-SC_OLD-b24a35ab85fbd25741143afc902868c42df0b363.tar.bz2
opensim-SC_OLD-b24a35ab85fbd25741143afc902868c42df0b363.tar.xz
Indent code properly.
Diffstat (limited to 'src/sledjchisl')
-rw-r--r--src/sledjchisl/sledjchisl.c84
1 files changed, 38 insertions, 46 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 1f60673..8b9d567 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -3533,60 +3533,52 @@ static int validateName(reqData *Rd, qhashtbl_t *data)
3533 3533
3534 if (login) 3534 if (login)
3535 { 3535 {
3536if (rt) 3536 if (rt)
3537{
3538 bitch(Rd, "Login failed.", "Could not read user Lua file.");
3539 ret += rt;
3540 if (i == 0)
3541 { 3537 {
3542 bitch(Rd, "Login failed.", "No UserAccounts record with that name."); 3538 bitch(Rd, "Login failed.", "Could not read user Lua file.");
3543 ret++; 3539 ret += rt;
3544 } 3540 if (i == 0)
3545 else
3546 {
3547 if (i != 1)
3548 { 3541 {
3549 bitch(Rd, "Login failed.", "More than one UserAccounts record with that name."); 3542 bitch(Rd, "Login failed.", "No UserAccounts record with that name.");
3550 ret++; 3543 ret++;
3551 } 3544 }
3552 else 3545 else
3553 { 3546 {
3554 dbPull(Rd, "UserAccounts", rows); 3547 if (i != 1)
3555 Rd->stuff->putstr(Rd->stuff, "UUID", xstrdup(getStrH(Rd->database, "UserAccounts.PrincipalID"))); 3548 {
3556 Rd->stuff->putstr(Rd->stuff, "level", xstrdup(getStrH(Rd->database, "UserAccounts.Userlevel"))); 3549 bitch(Rd, "Login failed.", "More than one UserAccounts record with that name.");
3557 if (s) {s--; *s = ' '; s++;} 3550 ret++;
3558 Rd->stuff->putstr(Rd->stuff, "name", xstrdup(name)); 3551 }
3552 else
3553 {
3554 dbPull(Rd, "UserAccounts", rows);
3555 Rd->stuff->putstr(Rd->stuff, "UUID", xstrdup(getStrH(Rd->database, "UserAccounts.PrincipalID")));
3556 Rd->stuff->putstr(Rd->stuff, "level", xstrdup(getStrH(Rd->database, "UserAccounts.Userlevel")));
3557 if (s) {s--; *s = ' '; s++;}
3558 Rd->stuff->putstr(Rd->stuff, "name", xstrdup(name));
3559 }
3559 } 3560 }
3560 } 3561 }
3561} 3562 else
3562else 3563 {
3563{ 3564 Rd->database->putstr(Rd->database, "UserAccounts.FirstName", name);
3564// if (0 != rt) 3565 Rd->database->putstr(Rd->database, "UserAccounts.LastName", s);
3565 { 3566 Rd->database->putstr(Rd->database, "UserAccounts.Email", getStrH(tnm, "email"));
3566 } 3567 Rd->database->putstr(Rd->database, "UserAccounts.Created", getStrH(tnm, "created"));
3567// else 3568 Rd->database->putstr(Rd->database, "UserAccounts.PrincipleID", getStrH(tnm, "UUID"));
3568 { 3569 Rd->database->putstr(Rd->database, "UserAccounts.UserLevel", getStrH(tnm, "level"));
3569 Rd->database->putstr(Rd->database, "UserAccounts.FirstName", name); 3570 Rd->database->putstr(Rd->database, "UserAccounts.UserFlags", getStrH(tnm, "flags"));
3570 Rd->database->putstr(Rd->database, "UserAccounts.LastName", s); 3571 Rd->database->putstr(Rd->database, "UserAccounts.UserTitle", getStrH(tnm, "title"));
3571 Rd->database->putstr(Rd->database, "UserAccounts.Email", getStrH(tnm, "email")); 3572 Rd->database->putstr(Rd->database, "UserAccounts.active", getStrH(tnm, "active"));
3572 Rd->database->putstr(Rd->database, "UserAccounts.Created", getStrH(tnm, "created")); 3573 Rd->database->putstr(Rd->database, "auth.passwordSalt", getStrH(tnm, "passwordSalt"));
3573 Rd->database->putstr(Rd->database, "UserAccounts.PrincipleID", getStrH(tnm, "UUID")); 3574 Rd->database->putstr(Rd->database, "auth.passwordHash", getStrH(tnm, "passwordHash"));
3574 Rd->database->putstr(Rd->database, "UserAccounts.UserLevel", getStrH(tnm, "level")); 3575
3575 Rd->database->putstr(Rd->database, "UserAccounts.UserFlags", getStrH(tnm, "flags")); 3576 Rd->stuff->putstr(Rd->stuff, "UUID", xstrdup(getStrH(Rd->database, "UserAccounts.PrincipalID")));
3576 Rd->database->putstr(Rd->database, "UserAccounts.UserTitle", getStrH(tnm, "title")); 3577 Rd->stuff->putstr(Rd->stuff, "level", xstrdup(getStrH(Rd->database, "UserAccounts.Userlevel")));
3577 Rd->database->putstr(Rd->database, "UserAccounts.active", getStrH(tnm, "active")); 3578 if (s) {s--; *s = ' '; s++;}
3578 Rd->database->putstr(Rd->database, "auth.passwordSalt", getStrH(tnm, "passwordSalt")); 3579 Rd->stuff->putstr(Rd->stuff, "name", xstrdup(name));
3579 Rd->database->putstr(Rd->database, "auth.passwordHash", getStrH(tnm, "passwordHash")); 3580 if (s) {s--; *s = '\0'; s++;}
3580 3581 }
3581 Rd->stuff->putstr(Rd->stuff, "UUID", xstrdup(getStrH(Rd->database, "UserAccounts.PrincipalID")));
3582 Rd->stuff->putstr(Rd->stuff, "level", xstrdup(getStrH(Rd->database, "UserAccounts.Userlevel")));
3583 if (s) {s--; *s = ' '; s++;}
3584 Rd->stuff->putstr(Rd->stuff, "name", xstrdup(name));
3585 if (s) {s--; *s = '\0'; s++;}
3586 }
3587
3588
3589}
3590 } 3582 }
3591 else if (strcmp("create", Rd->doit) == 0) 3583 else if (strcmp("create", Rd->doit) == 0)
3592 { 3584 {