diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 13 | ||||
-rw-r--r-- | src/char_sql/char.c | 13 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c index 774554037..1556c10a3 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1826,6 +1826,8 @@ static int char_delete(struct mmo_charstatus *cs) { return 0;
}
+int send_accounts_tologin(int tid, unsigned int tick, int id, int data);
+
int parse_tologin(int fd) {
int i;
struct char_session_data *sd;
@@ -1862,8 +1864,15 @@ int parse_tologin(int fd) { exit(1);
} else {
ShowStatus("Connected to login-server (connection #%d).\n", fd);
- if (kick_on_disconnect)
- set_all_offline();
+// Don't set them offline as there's no packet to tell the map server
+// to kick everyone out. Also, a disconnection from the login server is
+// NOT something serious to the data integrity as a char-map disconnect
+// is. [Skotlex]
+// if (kick_on_disconnect)
+// set_all_offline();
+// However, on reconnect, DO send our connected accounts to login.
+ send_accounts_tologin(-1, gettick(), 0, 0);
+
// if no map-server already connected, display a message...
for(i = 0; i < MAX_MAP_SERVERS; i++)
if (server_fd[i] >= 0 && server[i].map[0]) // if map-server online and at least 1 map
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 7c031bf16..fb024a4ea 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1771,6 +1771,8 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) { return 0;
}
+int send_accounts_tologin(int tid, unsigned int tick, int id, int data);
+
int parse_tologin(int fd) {
int i;
struct char_session_data *sd;
@@ -1810,8 +1812,15 @@ int parse_tologin(int fd) { //exit(1); //fixed for server shutdown.
}else {
ShowStatus("Connected to login-server (connection #%d).\n", fd);
- if (kick_on_disconnect)
- set_all_offline();
+// Don't set them offline as there's no packet to tell the map server
+// to kick everyone out. Also, a disconnection from the login server is
+// NOT something serious to the data integrity as a char-map disconnect
+// is. [Skotlex]
+// if (kick_on_disconnect)
+// set_all_offline();
+// However, on reconnect, DO send our connected accounts to login.
+ send_accounts_tologin(-1, gettick(), 0, 0);
+
// if no map-server already connected, display a message...
for(i = 0; i < MAX_MAP_SERVERS; i++)
if (server_fd[i] > 0 && server[i].map[0]) // if map-server online and at least 1 map
|