summaryrefslogtreecommitdiff
path: root/src/common/showmsg.c
diff options
context:
space:
mode:
authormc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-14 00:33:01 +0000
committermc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-14 00:33:01 +0000
commit4aee20b0e1fdfb23d9336cea77a0985e463ea081 (patch)
tree0cca8570cea1e328d527952640287db50de5d6f6 /src/common/showmsg.c
parentc9e34e95d3d79d28927300684aaab6940fd03c9e (diff)
downloadhercules-4aee20b0e1fdfb23d9336cea77a0985e463ea081.tar.gz
hercules-4aee20b0e1fdfb23d9336cea77a0985e463ea081.tar.bz2
hercules-4aee20b0e1fdfb23d9336cea77a0985e463ea081.tar.xz
hercules-4aee20b0e1fdfb23d9336cea77a0985e463ea081.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@566 54d463be-8e91-2dee-dedb-b68131a5f0ec
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," ");