diff options
-rw-r--r-- | Changelog.txt | 1 | ||||
-rw-r--r-- | src/char_sql/char.c | 8 | ||||
-rw-r--r-- | src/login_sql/login.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt index 57e41d8ee..cbabbb7dc 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,6 @@ Date Added 01/07 + * Added the below-mentioned alive packet to SQL's char and login [celest] * Enabled login server 'anti-freeze' by default as a temporary solution to char-login disconnection [celest] * The TXT char server was rejecting login's "i'm alive" packet and disconnecting diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 0eccfe537..d7f17515b 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1556,6 +1556,14 @@ int parse_tologin(int fd) { RFIFOSKIP(fd,50); break; + // login-server alive packet + case 0x2718: + if (RFIFOREST(fd) < 2) + return 0; + // do whatever it's supposed to do here? + RFIFOSKIP(fd,2); + break; + /* case 0x2721: // gm reply. I don't want to support this function. printf("0x2721:GM reply\n"); { diff --git a/src/login_sql/login.c b/src/login_sql/login.c index d7f91a20a..25df5310d 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -629,6 +629,10 @@ int char_anti_freeze_system(int tid, unsigned int tick, int id, int data) { // printf("char_anti_freeze_system: server #%d '%s', flag: %d.\n", i, server[i].name, server_freezeflag[i]); if (server_freezeflag[i]-- < 1) {// Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed session[server_fd[i]]->eof = 1; + } else { + // send alive packet to check connection + WFIFOW(server_fd[i],0) = 0x2718; + WFIFOSET(server_fd[i],2); } } } |