From 70bea71a0907decf83c0c882001fd3d22c4322ad Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 20 Apr 2017 00:17:54 +0300 Subject: Drop support for client protocol version 6 (Feb 17 2015). --- src/elogin/parse.c | 4 ++-- src/emap/script_buildins.c | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/elogin/parse.c b/src/elogin/parse.c index 0a42ecd..282944d 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -34,7 +34,7 @@ void login_parse_version(int fd) clientVersion = RFIFOL(fd, 2); - if (clientVersion < 6) + if (clientVersion < 7) { lclif->login_error(fd, 5); return; @@ -58,7 +58,7 @@ bool elogin_client_login_pre(int *fdPtr, char username[NAME_LENGTH]; safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH); int len = (int)safestrnlen(username, NAME_LENGTH); - if (clientVersion < 6) + if (clientVersion < 7) { lclif->login_error(fd, 5); hookStop(); diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 2e47c77..3775814 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -241,7 +241,7 @@ BUILDIN(getItemLink) if (data) version = data->clientVersion; - if (i_data && version >= 7) + if (i_data) { if (!script_hasdata(st, 3)) { @@ -264,10 +264,6 @@ BUILDIN(getItemLink) strcat(item_name, "|@@]"); } } - else if (i_data) - { - sprintf(item_name, "[@@%u|%s@@]", (unsigned)i_data->nameid, i_data->jname); - } else if (item_id > 0) { sprintf(item_name, "[@@%u|Unknown Item@@]", (unsigned)item_id); @@ -1856,7 +1852,7 @@ BUILDIN(getInvIndexLink) if (data) version = data->clientVersion; - if (i_data && version >= 7) + if (i_data) { const struct item *const item = &sd->status.inventory[index]; if (item->card[0] == CARD0_PET || @@ -1878,10 +1874,6 @@ BUILDIN(getInvIndexLink) strcat(item_name, "|@@]"); } } - else if (i_data) - { - sprintf(item_name, "[@@%u|%s@@]", (unsigned)i_data->nameid, i_data->jname); - } else if (item_id > 0) { sprintf(item_name, "[@@%u|Unknown Item@@]", (unsigned)item_id); -- cgit v1.2.3-60-g2f50