LoginServer.ini reading updated
- LoginServer and LoginConfig blocks now break out if we enter a new block (previously the ini was read all thru) - Upon a failure from login server, world server will attempt to reload the ini (you can change account name/password on the fly if it is wrong)
This commit is contained in:
parent
ad12e29854
commit
6676f66184
3 changed files with 9 additions and 0 deletions
EQ2/source
|
@ -221,6 +221,10 @@ bool NetConnection::ReadLoginConfig() {
|
|||
items[1] = 1;
|
||||
items[2] = 1;
|
||||
items[3] = 1;
|
||||
if (!strncasecmp(type, "[", 1)) {
|
||||
// new block after LoginServer, skip
|
||||
break;
|
||||
}
|
||||
if (!strncasecmp(type, "serverport", 10)) {
|
||||
if (Seperator::IsNumber(buf) && atoi(buf) > 0 && atoi(buf) < 0xFFFF) {
|
||||
port = atoi(buf);
|
||||
|
|
|
@ -187,6 +187,7 @@ bool LoginServer::Process() {
|
|||
LogWrite(WORLD__ERROR, 0, "World", "Login Server returned a fatal error: %s\n", pack->pBuffer);
|
||||
tcpc->Disconnect();
|
||||
ret = false;
|
||||
net.ReadLoginINI();
|
||||
break;
|
||||
}
|
||||
case ServerOP_CharTimeStamp:
|
||||
|
|
|
@ -679,6 +679,10 @@ bool NetConnection::ReadLoginINI() {
|
|||
if (fscanf (f, "%[^=]=%[^\r\n]\n", type, buf) == 2)
|
||||
#endif
|
||||
{
|
||||
if (!strncasecmp(type, "[", 1)) {
|
||||
// new block after LoginServer, skip
|
||||
break;
|
||||
}
|
||||
if (!strncasecmp (type, "worldname", 9)) {
|
||||
snprintf(worldname, sizeof(worldname), "%s", buf);
|
||||
items[1] = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue