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/map.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index b26af3f36..a3757101d 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2614,22 +2614,22 @@ int parse_console(char* buf) if( n == 5 && strcmpi("admin",type) == 0 ){ if( !is_atcommand_sub(sd.fd,&sd,command,99) ) - printf("Console: not atcommand\n"); + ShowInfo("Console: not atcommand\n"); } else if( n == 2 && strcmpi("server",type) == 0 ){ if( strcmpi("shutdown",command) == 0 || - strcmpi("exit",command) == 0 || - strcmpi("quit",command) == 0 ){ + strcmpi("exit",command) == 0 || + strcmpi("quit",command) == 0 ){ runflag = 0; } } else if( strcmpi("help",type) == 0 ){ ShowNotice("To use GM commands:\n"); - printf("admin:: \n"); - printf("You can use any GM command that doesn't require the GM.\n"); - printf("No using @item or @warp however you can use @charwarp\n"); - printf("The is for commands that need coords of the GM\n"); - printf("IE: @spawn\n"); - printf("To shutdown the server:\n"); - printf("server:shutdown\n"); + ShowInfo("admin:: \n"); + ShowInfo("You can use any GM command that doesn't require the GM.\n"); + ShowInfo("No using @item or @warp however you can use @charwarp\n"); + ShowInfo("The is for commands that need coords of the GM\n"); + ShowInfo("IE: @spawn\n"); + ShowInfo("To shutdown the server:\n"); + ShowInfo("server:shutdown\n"); } return 0; @@ -3116,13 +3116,12 @@ void map_helpscreen(int flag) *------------------------------------------------------*/ void map_versionscreen(int flag) { - printf("CL_WHITE" "eAthena version %d.%02d.%02d, Athena Mod version %d" CL_RESET"\n", + ShowInfo("CL_WHITE" "eAthena version %d.%02d.%02d, Athena Mod version %d" CL_RESET"\n", ATHENA_MAJOR_VERSION, ATHENA_MINOR_VERSION, ATHENA_REVISION, ATHENA_MOD_VERSION); - puts(CL_GREEN "Website/Forum:" CL_RESET "\thttp://eathena.deltaanime.net/"); - puts(CL_GREEN "Download URL:" CL_RESET "\thttp://eathena.systeminplace.net/"); - puts(CL_GREEN "IRC Channel:" CL_RESET "\tirc://irc.deltaanime.net/#athena"); - puts("\nOpen " CL_WHITE "readme.html" CL_RESET " for more information."); + ShowInfo(CL_GREEN "Website/Forum:" CL_RESET "\thttp://eathena.deltaanime.net/"); + ShowInfo(CL_GREEN "IRC Channel:" CL_RESET "\tirc://irc.deltaanime.net/#athena"); + ShowInfo("\nOpen " CL_WHITE "readme.html" CL_RESET " for more information."); if (ATHENA_RELEASE_FLAG) ShowNotice("This version is not for release.\n"); if (flag) exit(EXIT_FAILURE); } @@ -3204,10 +3203,6 @@ int do_init(int argc, char *argv[]) chrif_setip(ip_str); } - 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); -- cgit v1.2.3-60-g2f50