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

- Fixed the map server complain on the default user/password

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5161 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 лет назад
Родитель
Сommit
0496215b70
4 измененных файлов с 15 добавлено и 10 удалено
  1. 3 0
      Changelog-Trunk.txt
  2. 10 10
      src/map/chrif.c
  3. 1 0
      src/map/chrif.h
  4. 1 0
      src/map/map.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
+2006/02/02
+	* Fixed the map server complain when using the default user/password
+	  showing up if you set the new user/pass on the import file. [Skotlex]
 2006/02/01
 	* Fixed compile errors and warning in chrif.c and charsave.c. [Valaris]
 	* Map and char server now will complain if they are run using the default

+ 10 - 10
src/map/chrif.c

@@ -114,15 +114,6 @@ static int char_init_done = 0;
 void chrif_setuserid(char *id)
 {
 	memcpy(userid, id, NAME_LENGTH);
-	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
-		ShowError("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");
-#ifdef TXT_ONLY
-		ShowNotice("Please edit your save/account.txt file to create a proper inter-server user/password (gender 'S')\n");
-#else
-		ShowNotice("Please edit your 'login' table to create a proper inter-server user/password (gender 'S')\n");
-#endif
-		ShowNotice("and then edit your user/password in conf/map_athena.conf (or conf/import/map_conf.txt)\n");
-	}
 }
 
 /*==========================================
@@ -132,7 +123,15 @@ void chrif_setuserid(char *id)
 void chrif_setpasswd(char *pwd)
 {
 	memcpy(passwd, pwd, NAME_LENGTH);
-	if (strcmp(userid, "s1")==0 && strcmp(pwd, "p1")==0) {
+}
+
+/*==========================================
+ *
+ *------------------------------------------
+ */
+void chrif_checkdefaultlogin(void)
+{
+	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
 		ShowError("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");
 #ifdef TXT_ONLY
 		ShowNotice("Please edit your save/account.txt file to create a proper inter-server user/password (gender 'S')\n");
@@ -143,6 +142,7 @@ void chrif_setpasswd(char *pwd)
 	}
 }
 
+
 /*==========================================
  *
  *------------------------------------------

+ 1 - 0
src/map/chrif.h

@@ -14,6 +14,7 @@ struct auth_node{
 
 void chrif_setuserid(char*);
 void chrif_setpasswd(char*);
+void chrif_checkdefaultlogin(void);
 void chrif_setip(char*);
 void chrif_setport(int);
 

+ 1 - 0
src/map/map.c

@@ -3811,6 +3811,7 @@ int do_init(int argc, char *argv[]) {
 	}
 
 	map_config_read(MAP_CONF_NAME);
+	chrif_checkdefaultlogin();
 
 	if ((naddr_ == 0) && (map_ip_set_ == 0 || char_ip_set_ == 0)) {
 		ShowError("\nUnable to determine your IP address... please edit the map_athena.conf file and set it.\n");