Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2008, 03:25 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default Server Lock Question

Is there a way to still have your server locked but allow users below 100 status entry? I would like to keep my server private but don't want everyone to have GM access. For example say I want to set it at 10 so I can limit the amount of GM commands being used.

If that is not possible is there a way to make a custom status level for all new accounts that is above 100, and only allows them a specific set of commands that are cherry picked from the whole set of commands?

Say for instance I want to keep my server locked but only want to allow players access to the following commands:

#zone
#heal
#itemsearch
#summonitem

I looked at the default status line in the config file but to me that looks like it sets an accounts default status to 0, not control who gets to log into a locked server.

Thanks
Reply With Quote
  #2  
Old 04-03-2008, 03:34 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

You can control the amount of status required to activate each #command in the commands table of the database.
Reply With Quote
  #3  
Old 04-03-2008, 03:42 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Yah I know I can do that but that would be a ton of commands to edit. If I was able to change the locked server status setting I could just set it to 10 to limit the commands then only have to change a couple of them.

I was told in IRC by mattmeck to "edit the code itself to lower the status that is allowed in when locked"

Anyone know how I could go about doing this? He didn't elaborate. I was probably idle to long when I got the message in IRC, and he was probably gone by the time I got back and asked for more info.
Reply With Quote
  #4  
Old 04-03-2008, 04:16 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

looks like if I change the following lines in world/loginserver.cpp it might do the trick.

Code:
 if(Config->Locked == true)
                        {
                                if((status == 0 || status < 100) && (status != -2 || status != -1))
                                        utwrs->response = 0;
                                if(status >= 100)
                                        utwrs->response = 1;
                        }
                        else {
                                utwrs->response = 1;
                        }
My guess is change the 100 to 10 in both lines then recompile world? Would that be it?
Reply With Quote
  #5  
Old 04-03-2008, 06:35 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

I was able to test this and it worked perfectly. I ended up setting the status to 5. Then changed the few commands that I wanted "privileged users" to have to 6. This way I can flag legit players as 5, and people that need a few more commands but not the whole shabang as 6.
Reply With Quote
  #6  
Old 04-04-2008, 12:07 AM
circuitdragon
Sarnak
 
Join Date: Jun 2003
Posts: 57
Default

A bit off topic, but you could have ran a script to change all command status levels to say...200, then lowered the select few you want "certain few" to have access to. But that wouldn't help with the locked status. And the way you went about it is perhaps the nicer way to do this. You could have left it open and dropped some NPCs at all starting locations to attack anyone with a "0" status. That would keep people off the server, though they would not be happy about it. lol
__________________
You can do nothing, and fail all the time. Or you can try something, and win some of the time.
Reply With Quote
  #7  
Old 04-04-2008, 12:09 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

This would be something good to add as a rule. I'm not really a C++ coder, but the following should do the trick.

Change common/ruletypes.h from this:
Code:
   58 RULE_CATEGORY( World )
   59 RULE_INT ( World, ZoneAutobootTimeoutMS, 60000 )
   60 RULE_INT ( World, ClientKeepaliveTimeoutMS, 65000 )
   61 RULE_CATEGORY_END()
to this:
Code:
RULE_CATEGORY( World )
RULE_INT ( World, ZoneAutobootTimeoutMS, 60000 )
RULE_INT ( World, ClientKeepaliveTimeoutMS, 65000 )
RULE_INT ( World, LockedOverrideMinStatus, 100 )
RULE_CATEGORY_END()
Change world/loginserver.cpp from this:
Code:
  123 			if(Config->Locked == true)
  124 			{
  125 				if((status == 0 || status < 100) && (status != -2 || status != -1))
  126 					utwrs->response = 0;
  127 				if(status >= 100)
  128 					utwrs->response = 1;
  129 			}
  130 			else {
  131 				utwrs->response = 1;
  132 			}
to this:
Code:
if(Config->Locked == true)
{
	if((status == 0 || status < RuleI(World, LockedOverrideMinStatus)) && (status != -2 || status != -1))
		utwrs->response = 0;
	if(status >= RuleI(World, LockedOverrideMinStatus))
		utwrs->response = 1;
}
else {
	utwrs->response = 1;
}
It might be worth declaring World:LockedOverrideMinStatus as a variable, but I'm not sure if it would make any performance increase (1 check into the rule system instead of 2).

Then, we just need to add the rule into the DB:
Code:
INSERT INTO rule_values (0, "World:LockedOverrideMinStatus", 100)
This way, you don't have to recompile the entire source, you can just change that rule and you're gtg.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #8  
Old 04-04-2008, 08:44 AM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Quote:
Originally Posted by circuitdragon View Post
You could have left it open and dropped some NPCs at all starting locations to attack anyone with a "0" status. That would keep people off the server, though they would not be happy about it. lol
Thats good stuff

I like the rule idea. Though it is not that hard to just go in and change those values before you compile the new source. Just have to remember to do it each time. I already go in and edit all my makefiles each time, whats one more change? But again a rule setting would make things much simpler.

By changing this setting I only had to change the status values for 5 commands, rather than change the 7 or 8 pages (phpmyadmin) of commands to 200, then drop all of the ones that I want the users to have to 100. This also allows me to keep the Guide/GM levels intact in case I wish to have some users fill those positions.

One thing I did notice though, how come a status level 0 user can manipulate guilds? In the commands table guilds is set to 0 by default, I changed this to 10 to prevent them from creating guilds and editing guilds without GM intervention.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:45 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3