Page 1 of 1

[FIX] Locked Status

Posted: Sun Jun 01, 2008 8:05 am
by John Adams
Edit: Clarifying
In the `variables` table is an override called "minlockedstatus", which by default is set to 100. If you set Locked=true in your LoginServer.ini, players cannot enter your Locked server unless their status is at least "minlockedstatus".
I noticed while running a locked Dev server that new characters created with a status of 0 were (of course) not being allowed into the locked server. So, to give the appearance I was LOCKED, but still allow me to create new toons, I set my minlockedstatus to 0, so new chars could get in.
A bug found in the "status > 0" check prevented me from overriding this status. Here's a simple fix to get locked status to allow admin_status=0 through.

Code: Select all

Index: LoginServer.cpp
===================================================================
--- LoginServer.cpp	(revision 99)
+++ LoginServer.cpp	(working copy)
@@ -294,7 +294,7 @@
 	if( var != NULL )
 	{
 		int status = atoi ( var->GetValue ( ) );
-		if(status > 0)
+		if(status >= 0)
 			minLockedStatus = status;
 	}

You may not have intended for status=0 players into a locked server, but I think this is a good option to show a server as LOCKED but still allow new characters to be created. For me, my Dev server is locked - but if you make a char there, expect it to be deleted, etc...
Setting minlockedstatus > 0 in the variables table will prevent new chars from entering that server until the admin bumps their characters.admin_status field to match.
Edit: Sorry I just woke up and wasn't super clear what the bug was in the first place.

Posted: Sun Jun 01, 2008 8:26 am
by LethalEncounter
That is the way it was intended to work (admin level has to be > 0 to join a locked server). Maybe I'll add a variable that will allow people to specify the minimum status to override the lock. That way they can just update their variables table in the DB to change it.

Posted: Sun Jun 01, 2008 8:29 am
by John Adams
Sorry LE. You do have an override. That's what this fix is to address. I set my "minlockedstatus" to 0, and because of the status > 0 check, I could not get in as a new player.
I assumed it was a bug, because if I set minlockedstatus=0, I should be able to get in anyway. :)

Posted: Sun Jun 01, 2008 8:34 am
by LethalEncounter
Ah nevermind then, guess I should read your post more careful next time. :P I'll make the change. That is one of the things left over from EQEmu that I completely forgot about.

Posted: Sun Jun 01, 2008 8:48 am
by John Adams
Naw you probably read it fine. My bad for being sleepy and not writing it up properly. heh.
Thanks for the fix. Hopefully I can help out a little more here and there.