diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/login.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/login/login.c b/src/login/login.c index 3c38c738c..84d6afd0f 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -3466,24 +3466,25 @@ int parse_login(int fd) { //----------------------- // Console Command Parser [Wizputer] //----------------------- -int parse_console(char *buf) { +int parse_console(char *buf) +{ char command[256]; - memset(command,0,sizeof(command)); + memset(command, 0, sizeof(command)); sscanf(buf, "%[^\n]", command); login_log("Console command :%s" RETCODE, command); - if(strcmpi("shutdown", command) == 0 || + if( strcmpi("shutdown", command) == 0 || strcmpi("exit", command) == 0 || strcmpi("quit", command) == 0 || - strcmpi("end", command) == 0) + strcmpi("end", command) == 0 ) runflag = 0; - else if(strcmpi("alive", command) == 0 || - strcmpi("status", command) == 0) + else if( strcmpi("alive", command) == 0 || + strcmpi("status", command) == 0 ) ShowInfo(CL_CYAN"Console: "CL_BOLD"I'm Alive."CL_RESET"\n"); - else if(strcmpi("help", command) == 0) { + else if( strcmpi("help", command) == 0 ){ printf(CL_BOLD"Help of commands:"CL_RESET"\n"); printf(" To shutdown the server:\n"); printf(" 'shutdown|exit|qui|end'\n"); |