diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-06 14:19:26 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-06 14:19:26 +0000 |
commit | 3adaf8788b65a84ec4266c6621d30679a95f546d (patch) | |
tree | da233eb45db1f482a4f2a86be9529c90edd76c8b /src/map/clif.c | |
parent | ad95c2ba955e42d74afffbb6b9b333f69a3f1b1e (diff) | |
download | hercules-3adaf8788b65a84ec4266c6621d30679a95f546d.tar.gz hercules-3adaf8788b65a84ec4266c6621d30679a95f546d.tar.bz2 hercules-3adaf8788b65a84ec4266c6621d30679a95f546d.tar.xz hercules-3adaf8788b65a84ec4266c6621d30679a95f546d.zip |
Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, generated by ShowMessage(). It now works exactly like printf().
Removed/replaced all printf calls in the code.
Added a new flag to setting 'console_silent', for filtering debug messages.
Silenced the "Broken pipe found" and "Server running in debug mode" messages.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 46aa4494a..f9ba58156 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -249,9 +249,9 @@ int clif_send_sub(struct block_list *bl, va_list ap) if (session[fd] != NULL) { WFIFOHEAD(fd, len); if (WFIFOP(fd,0) == buf) { - printf("WARNING: Invalid use of clif_send function\n"); - printf(" Packet x%4x use a WFIFO of a player instead of to use a buffer.\n", WBUFW(buf,0)); - printf(" Please correct your code.\n"); + ShowError("WARNING: Invalid use of clif_send function\n"); + ShowError(" Packet x%4x use a WFIFO of a player instead of to use a buffer.\n", WBUFW(buf,0)); + ShowError(" Please correct your code.\n"); // don't send to not move the pointer of the packet for next sessions in the loop WFIFOSET(fd,0);//## TODO is this ok? } else { @@ -11495,13 +11495,13 @@ void clif_parse_debug(int fd,struct map_session_data *sd) cmd = RFIFOW(fd,0); len = sd?packet_db[sd->packet_ver][cmd].len:RFIFOREST(fd); //With no session, just read the remaining in the buffer. ShowDebug("packet debug 0x%4X\n",cmd); - printf("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F"); + ShowMessage("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F"); for(i=0;i<len;i++){ if((i&15)==0) - printf("\n%04X ",i); - printf("%02X ",RFIFOB(fd,i)); + ShowMessage("\n%04X ",i); + ShowMessage("%02X ",RFIFOB(fd,i)); } - printf("\n"); + ShowMessage("\n"); } /*========================================== @@ -11648,21 +11648,21 @@ int clif_parse(int fd) if (dump) { int i; ShowDebug("\nclif_parse: session #%d, packet 0x%04x, length %d, version %d\n", fd, cmd, packet_len, packet_ver); - printf("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F"); + ShowMessage("---- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F"); for(i = 0; i < packet_len; i++) { if ((i & 15) == 0) - printf("\n%04X ",i); - printf("%02X ", RFIFOB(fd,i)); + ShowMessage("\n%04X ",i); + ShowMessage("%02X ", RFIFOB(fd,i)); } - printf("\n"); + ShowMessage("\n"); if (sd && sd->state.auth) { if (sd->status.name != NULL) - printf("\nAccount ID %d, character ID %d, player name %s.\n", - sd->status.account_id, sd->status.char_id, sd->status.name); + ShowMessage("\nAccount ID %d, character ID %d, player name %s.\n", + sd->status.account_id, sd->status.char_id, sd->status.name); else - printf("\nAccount ID %d.\n", sd->bl.id); + ShowMessage("\nAccount ID %d.\n", sd->bl.id); } else if (sd) // not authentified! (refused by char-server or disconnect before to be authentified) - printf("\nAccount ID %d.\n", sd->bl.id); + ShowMessage("\nAccount ID %d.\n", sd->bl.id); }*/ RFIFOSKIP(fd, packet_len); |