diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/login.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/login/login.c b/src/login/login.c index 73e89d4ff..3da592ebc 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -65,6 +65,7 @@ struct auth_node { char sex; uint32 version; uint8 clienttype; + int group_id; }; static DBMap* auth_db; // int account_id -> struct auth_node* @@ -408,7 +409,7 @@ int parse_fromchar(int fd) //ShowStatus("Char-server '%s': authentication of the account %d accepted (ip: %s).\n", server[id].name, account_id, ip); // send ack - WFIFOHEAD(fd,25); + WFIFOHEAD(fd,29); WFIFOW(fd,0) = 0x2713; WFIFOL(fd,2) = account_id; WFIFOL(fd,6) = login_id1; @@ -418,7 +419,8 @@ int parse_fromchar(int fd) WFIFOL(fd,16) = request_id; WFIFOL(fd,20) = node->version; WFIFOB(fd,24) = node->clienttype; - WFIFOSET(fd,25); + WFIFOL(fd,25) = node->group_id; + WFIFOSET(fd,29); // each auth entry can only be used once idb_remove(auth_db, account_id); @@ -426,7 +428,7 @@ int parse_fromchar(int fd) else {// authentication not found ShowStatus("Char-server '%s': authentication of the account %d REFUSED (ip: %s).\n", server[id].name, account_id, ip); - WFIFOHEAD(fd,25); + WFIFOHEAD(fd,29); WFIFOW(fd,0) = 0x2713; WFIFOL(fd,2) = account_id; WFIFOL(fd,6) = login_id1; @@ -436,7 +438,8 @@ int parse_fromchar(int fd) WFIFOL(fd,16) = request_id; WFIFOL(fd,20) = 0; WFIFOB(fd,24) = 0; - WFIFOSET(fd,25); + WFIFOL(fd,25) = 0; + WFIFOSET(fd,29); } } break; @@ -1206,6 +1209,7 @@ void login_auth_ok(struct login_session_data* sd) node->ip = ip; node->version = sd->version; node->clienttype = sd->clienttype; + node->group_id = sd->group_id; idb_put(auth_db, sd->account_id, node); { |