Просмотр исходного кода

Removed some warnings in run-once mode

Lemongrass3110 9 лет назад
Родитель
Сommit
a0b3e517c8
2 измененных файлов с 6 добавлено и 2 удалено
  1. 2 1
      src/map/chrif.c
  2. 4 1
      src/map/map.c

+ 2 - 1
src/map/chrif.c

@@ -238,7 +238,8 @@ void chrif_setpasswd(char *pwd) {
 
 // security check, prints warning if using default password
 void chrif_checkdefaultlogin(void) {
-	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
+	// Skip this check if the server is run with run-once flag
+	if ( runflag != CORE_ST_STOP && strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
 		ShowWarning("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");
 		ShowNotice("Please edit your 'login' table to create a proper inter-server user/password (gender 'S')\n");
 		ShowNotice("and then edit your user/password in conf/map_athena.conf (or conf/import/map_conf.txt)\n");

+ 4 - 1
src/map/map.c

@@ -4663,7 +4663,10 @@ int do_init(int argc, char *argv[])
 		char ip_str[16];
 		ip2str(addr_[0], ip_str);
 
-		ShowWarning("Not all IP addresses in map_athena.conf configured, autodetecting...\n");
+		// Skip this warning if the server is run with run-once flag
+		if( runflag != CORE_ST_STOP ){
+			ShowWarning("Not all IP addresses in map_athena.conf configured, autodetecting...\n");
+		}
 
 		if (naddr_ == 0)
 			ShowError("Unable to determine your IP address...\n");