summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 16:31:05 +0000
committermc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-22 16:31:05 +0000
commit260f3c8f931a55b334b7903475a667406f69cce2 (patch)
tree157131e868296b8f99c99515da86bc5b34527f3d /src
parent5612f822c84f6c6adde97b2676d1bab6658ef4c0 (diff)
downloadhercules-260f3c8f931a55b334b7903475a667406f69cce2.tar.gz
hercules-260f3c8f931a55b334b7903475a667406f69cce2.tar.bz2
hercules-260f3c8f931a55b334b7903475a667406f69cce2.tar.xz
hercules-260f3c8f931a55b334b7903475a667406f69cce2.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@732 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/common/showmsg.c7
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/npc.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 8c7fc9a13..3488926bf 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -35,8 +35,9 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
case MSG_WARNING: //Bright Yellow
strcpy(prefix,CL_YELLOW"[Warning]"CL_RESET":");
break;
- case MSG_DEBUG:
+ case MSG_DEBUG: //Bright Cyan, important stuff!
strcpy(prefix,CL_CYAN"[Debug]"CL_RESET":");
+ break;
case MSG_ERROR: //Bright Red (Regular errors)
strcpy(prefix,CL_RED"[Error]"CL_RESET":");
break;
@@ -47,16 +48,20 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
ShowError("In function _ShowMessage() -> Invalid flag passed.\n");
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);
+ }
/*
if ((core_config.debug_output_level > -1) && (flag >= core_config.debug_output_level)) {
FILE *fp;
diff --git a/src/map/map.c b/src/map/map.c
index 509504773..0a9191e27 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2378,7 +2378,7 @@ int do_init(int argc, char *argv[]) {
if (ptr[0] == 192 && ptr[1] == 168)
printf("\nFirewall detected.. \n edit lan_support.conf and map_athena.conf\n\n");
}
-
+ if (SHOW_DEBUG_MSG) ShowNotice("Server running in '"CL_WHITE"Debug Mode"CL_RESET"'.\n");
battle_config_read(BATTLE_CONF_FILENAME);
msg_config_read(MSG_CONF_NAME);
atcommand_config_read(ATCOMMAND_CONF_FILENAME);
@@ -2471,6 +2471,5 @@ int do_init(int argc, char *argv[]) {
ticks = gettick();
-
return 0;
}
diff --git a/src/map/npc.c b/src/map/npc.c
index 4a7704740..88f6fc6e9 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1702,7 +1702,9 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
char srcname[128];
struct npc_data *nd2;
if( sscanf(w2,"duplicate(%[^)])",srcname)!=1 ){
- printf("bad duplicate name! : %s",w2);
+ printf("\n");
+ snprintf(tmp_output,sizeof(tmp_output),"Bad duplicate name! : %s",w2);
+ ShowWarning(tmp_output);
return 0;
}
if( (nd2=npc_name2id(srcname))==NULL ){