From f593049cd8286f48497782d8bc0afe787724ad5d Mon Sep 17 00:00:00 2001 From: wushin Date: Mon, 9 Nov 2015 13:46:56 -0600 Subject: Add third gender to account Add Gender to char Make gear work proper with new gender Enable legacy clients to use account gender --- src/admin/ladmin.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/admin/ladmin.cpp') diff --git a/src/admin/ladmin.cpp b/src/admin/ladmin.cpp index e0d6b06..ac9be1d 100644 --- a/src/admin/ladmin.cpp +++ b/src/admin/ladmin.cpp @@ -205,7 +205,7 @@ namespace admin // // sex // Modify the sex of an account. -// sex testname Male +// sex testname M // // state // Change the state of an account. @@ -490,7 +490,7 @@ void display_help(ZString param) { PRINTF("sex \n"_fmt); PRINTF(" Modify the sex of an account.\n"_fmt); - PRINTF(" sex testname Male\n"_fmt); + PRINTF(" sex testname M\n"_fmt); } else if (command == "state"_s) { @@ -627,7 +627,7 @@ void addaccount(ZString param, int emailflag) if (!name.is_print()) return; - if (!"MF"_s.contains(sex)) + if (!"MFN"_s.contains(sex)) { PRINTF("Illegal gender [%c]. Please input M or F.\n"_fmt, sex); LADMIN_LOG("Illegal gender [%c]. Please input M or F.\n"_fmt, sex); @@ -1291,7 +1291,7 @@ void changesex(ZString param) if (!qsplit(param, &name, &sex_)) { PRINTF("Please input an account name and a sex.\n"_fmt); - PRINTF(" sex testname Male\n"_fmt); + PRINTF(" sex testname M\n"_fmt); LADMIN_LOG("Incomplete parameters to change the sex of an account ('sex' command).\n"_fmt); return; } @@ -1303,7 +1303,7 @@ void changesex(ZString param) return; } - if (!"MF"_s.contains(sex)) + if (!"MFN"_s.contains(sex)) { PRINTF("Illegal gender [%c]. Please input M or F.\n"_fmt, sex); LADMIN_LOG("Illegal gender [%c]. Please input M or F.\n"_fmt, sex); @@ -1750,6 +1750,8 @@ void parse_fromlogin(Session *s) PRINTF("%-5s "_fmt, "Femal"_s); else if (info.sex == SEX::MALE) PRINTF("%-5s "_fmt, "Male"_s); + else if (info.sex == SEX::NEUTRAL) + PRINTF("%-5s "_fmt, "None"_s); else PRINTF("%-5s "_fmt, "Servr"_s); PRINTF("%6d "_fmt, info.login_count); @@ -2347,6 +2349,8 @@ void parse_fromlogin(Session *s) PRINTF(" Sex: Female\n"_fmt); else if (sex == SEX::MALE) PRINTF(" Sex: Male\n"_fmt); + else if (sex == SEX::NEUTRAL) + PRINTF(" Sex: None\n"_fmt); else // doesn't happen anymore PRINTF(" Sex: Server\n"_fmt); PRINTF(" E-mail: %s\n"_fmt, email); -- cgit v1.2.3-60-g2f50