浏览代码

- Map and char server now will complain if they are run using the default user/password set.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5158 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父节点
当前提交
d9f1d70901
共有 4 个文件被更改,包括 32 次插入0 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 6 0
      src/char/char.c
  3. 6 0
      src/char_sql/char.c
  4. 18 0
      src/map/chrif.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/02/01
+	* Map and char server now will complain if they are run using the default
+	  user/password set. [Skotlex]
 	* Trick Dead makes you stop walking now. [Skotlex]
 	* Soul Burn is not affected by Lex Aeterna, not affected by target's cards
 	  neither. [Skotlex]

+ 6 - 0
src/char/char.c

@@ -4084,6 +4084,12 @@ int do_init(int argc, char **argv) {
 	char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
 	lan_config_read((argc > 1) ? argv[1] : LOGIN_LAN_CONF_NAME);
 
+	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
+		ShowError("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");
+		ShowNotice("Please edit your save/account.txt file to create a proper inter-server user/password (gender 'S')\n");
+		ShowNotice("And then change the user/password to use in conf/char_athena.conf (or conf/import/char_conf.txt)\n");
+	}
+
 	// a newline in the log...
 	char_log("");
 	// moved behind char_config_read in case we changed the filename [celest]

+ 6 - 0
src/char_sql/char.c

@@ -4143,6 +4143,12 @@ int do_init(int argc, char **argv){
 	char_lan_config_read((argc > 1) ? argv[1] : LAN_CONF_NAME);
 	sql_config_read(SQL_CONF_NAME);
 
+	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
+		ShowError("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 change the user/password to use in conf/char_athena.conf (or conf/import/char_conf.txt)\n");
+	}
+	
 	ShowInfo("Finished reading the char-server configuration.\n");
 
 	inter_init((argc > 2) ? argv[2] : inter_cfgName); // inter server ÃʱâÈ­

+ 18 - 0
src/map/chrif.c

@@ -114,6 +114,15 @@ 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");
+	}
 }
 
 /*==========================================
@@ -123,6 +132,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) {
+		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");
+	}
 }
 
 /*==========================================