diff options
author | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-29 04:23:53 +0000 |
---|---|---|
committer | mc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-29 04:23:53 +0000 |
commit | 64222fdc35acf719398aee8581b5009439ac32d6 (patch) | |
tree | 2904c81a7d2a4b03d2a35073e94fcfb8196c5004 /src/common/showmsg.c | |
parent | 6bf052b6b27325a808d16e3801d3bad8e271688c (diff) | |
download | hercules-64222fdc35acf719398aee8581b5009439ac32d6.tar.gz hercules-64222fdc35acf719398aee8581b5009439ac32d6.tar.bz2 hercules-64222fdc35acf719398aee8581b5009439ac32d6.tar.xz hercules-64222fdc35acf719398aee8581b5009439ac32d6.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@409 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/showmsg.c')
-rw-r--r-- | src/common/showmsg.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c index b65181f3a..f60fb88b4 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -19,38 +19,39 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri } switch (flag) { case MSG_STATUS: //Bright Green (To inform about good things) - strcpy(prefix,"\033[1;32m[Status]\033[0;0m: "); + strcpy(prefix,"\033[1;32m[Status]\033[0;0m:"); break; /* //Do we really need this now? [MC Cameri] case MSG_SQL: //Bright Violet (For dumping out anything related with SQL) - strcpy(prefix,"\033[1;35m[SQL]\033[0;0m: "); + strcpy(prefix,"\033[1;35m[SQL]\033[0;0m:"); break; */ - case MSG_INFORMATION: //Bright Blue (Variable information) - strcpy(prefix,"\033[1;34m[Info]\033[0;0m: "); + case MSG_INFORMATION: //Bright White (Variable information) + strcpy(prefix,"\033[1;29m[Info]\033[0;0m:"); break; case MSG_NOTICE: //Bright White (Less than a warning) - strcpy(prefix,"\033[1;29m[Notice]\033[0;0m: "); + strcpy(prefix,"\033[1;29m[Notice]\033[0;0m:"); break; case MSG_WARNING: //Bright Yellow - strcpy(prefix,"\033[1;33m[Warning]\033[0;0m: "); + strcpy(prefix,"\033[1;33m[Warning]\033[0;0m:"); break; case MSG_ERROR: //Bright Red (Regular errors) - strcpy(prefix,"\033[1;31m[Error]\033[0;0m: "); + strcpy(prefix,"\033[1;31m[Error]\033[0;0m:"); break; case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible) - strcpy(prefix,"\033[1;31m[Fatal Error]\033[0;0m: "); + strcpy(prefix,"\033[1;31m[Fatal Error]\033[0;0m:"); break; default: ShowError("In function _ShowMessage() -> Invalid flag passed.\n"); return 1; } - output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string))+1); + output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string)+2)); // +2: space and a \0 if (output == NULL) { return 1; -// abort(); // Kill server? +// abort(); // Kill server? Deadly } strcpy(output,prefix); + strcpy(output," "); strcat(output,string); printf(output); fflush(stdout); |