summaryrefslogtreecommitdiff
path: root/src/common/showmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/showmsg.c')
-rw-r--r--src/common/showmsg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index e96f97e22..32b9dd22c 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -14,12 +14,12 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
char prefix[40];
char *output;
if (strlen(string) <= 0) {
- ShowError("Empty string passed to ShowMessage().\n");
+ ShowError("Empty string passed to _ShowMessage().\n");
return 1;
}
switch (flag) {
case MSG_STATUS: //Bright Green (To inform about good things)
- strcpy(prefix,"\033[1;32m[Status]\033[0;0m:");
+ strcpy(prefix,CL_GREEN"[Status]"CL_RESET":");
break;
/* //Do we really need this now? [MC Cameri]
case MSG_SQL: //Bright Violet (For dumping out anything related with SQL)
@@ -27,19 +27,19 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
break;
*/
case MSG_INFORMATION: //Bright White (Variable information)
- strcpy(prefix,"\033[1;29m[Info]\033[0;0m:");
+ strcpy(prefix,CL_WHITE"[Info]"CL_RESET":");
break;
case MSG_NOTICE: //Bright White (Less than a warning)
- strcpy(prefix,"\033[1;29m[Notice]\033[0;0m:");
+ strcpy(prefix,CL_WHITE"[Notice]"CL_RESET":");
break;
case MSG_WARNING: //Bright Yellow
- strcpy(prefix,"\033[1;33m[Warning]\033[0;0m:");
+ strcpy(prefix,CL_YELLOW"[Warning]"CL_RESET":");
break;
case MSG_ERROR: //Bright Red (Regular errors)
- strcpy(prefix,"\033[1;31m[Error]\033[0;0m:");
+ strcpy(prefix,CL_RED"[Error]"CL_RESET":");
break;
case MSG_FATALERROR: //Bright Red (Fatal errors, abort(); if possible)
- strcpy(prefix,"\033[1;31m[Fatal Error]\033[0;0m:");
+ strcpy(prefix,CL_RED"[Fatal Error]"CL_RESET":");
break;
default:
ShowError("In function _ShowMessage() -> Invalid flag passed.\n");
@@ -48,7 +48,7 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string)+2)); // +2: space and a \0
if (output == NULL) {
return 1;
-// abort(); // Kill server? Deadly
+// exit(1); // Kill server? Deadly
}
strcpy(output,prefix);
strcat(output," ");