summaryrefslogtreecommitdiff
path: root/src/common/showmsg.c
diff options
context:
space:
mode:
authormc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 14:35:37 +0000
committermc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 14:35:37 +0000
commit99b156f4ec91f2d52fd57aa1710ae9261b8db356 (patch)
tree25c8060557acb80f95a0d1ab17f169eeff2282d4 /src/common/showmsg.c
parent56514473a9d504324f3b4bf6b2e062cabd19eadd (diff)
downloadhercules-99b156f4ec91f2d52fd57aa1710ae9261b8db356.tar.gz
hercules-99b156f4ec91f2d52fd57aa1710ae9261b8db356.tar.bz2
hercules-99b156f4ec91f2d52fd57aa1710ae9261b8db356.tar.xz
hercules-99b156f4ec91f2d52fd57aa1710ae9261b8db356.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@820 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/showmsg.c')
-rw-r--r--src/common/showmsg.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 3488926bf..857a819bb 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -21,11 +21,9 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
case MSG_STATUS: //Bright Green (To inform about good things)
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)
strcpy(prefix,CL_MAGENTA"[SQL]"CL_RESET":");
break;
-*/
case MSG_INFORMATION: //Bright White (Variable information)
strcpy(prefix,CL_WHITE"[Info]"CL_RESET":");
break;
@@ -49,18 +47,18 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
return 1;
}
if (!(flag == MSG_DEBUG && !SHOW_DEBUG_MSG)) {
- output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string)+2)); // +2: space and a \0
- if (output == NULL) {
- return 1;
-// exit(1); // Kill server? Deadly
- }
-
- strcpy(output,prefix);
- strcat(output," ");
- strcat(output,string);
- printf(output);
- fflush(stdout);
- free(output);
+ output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string)+2)); // prefix+string+two chars(space and \0)
+ if (output == NULL) {
+ return 1;
+// exit(1); // Kill server? Deadly
+ }
+
+ strcpy(output,prefix);
+ strcat(output," ");
+ strcat(output,string);
+ printf(output);
+ fflush(stdout);
+ free(output);
}
/*
if ((core_config.debug_output_level > -1) && (flag >= core_config.debug_output_level)) {