From 3adaf8788b65a84ec4266c6621d30679a95f546d Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 6 Jan 2008 14:19:26 +0000 Subject: 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 --- src/map/clif.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/map/clif.c') 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;istate.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); -- cgit v1.2.3-60-g2f50