diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-02-08 21:35:13 -0500 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-02-08 21:35:13 -0500 |
commit | 8b0fab6ad2c3533eb054eb292a630b691502beae (patch) | |
tree | 9ccd267676b3c25493c13a4399e475334e8dc90f /src/admin | |
parent | 71c9e0c06045303c5a0a9fb7c849b76583e449c0 (diff) | |
parent | f889e025cc403ceb6f6276d66fdc367f544a0e82 (diff) | |
download | tmwa-8b0fab6ad2c3533eb054eb292a630b691502beae.tar.gz tmwa-8b0fab6ad2c3533eb054eb292a630b691502beae.tar.bz2 tmwa-8b0fab6ad2c3533eb054eb292a630b691502beae.tar.xz tmwa-8b0fab6ad2c3533eb054eb292a630b691502beae.zip |
Merge pull request #177 from wushin/add-third-gender
Add third gender
Diffstat (limited to 'src/admin')
-rw-r--r-- | src/admin/ladmin.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
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 <account_name> <sex> // Modify the sex of an account. -// <example> sex testname Male +// <example> sex testname M // // state <account_name> <new_state> <error_message_#7> // Change the state of an account. @@ -490,7 +490,7 @@ void display_help(ZString param) { PRINTF("sex <account_name> <sex>\n"_fmt); PRINTF(" Modify the sex of an account.\n"_fmt); - PRINTF(" <example> sex testname Male\n"_fmt); + PRINTF(" <example> 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("<example> sex testname Male\n"_fmt); + PRINTF("<example> 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); |