I've been here long enough that I would have seen this if it was available, but I cannot find the answer to my question. I found similar answers, but not the one I'm looking to reference.

I know there is a way to limit max accounts and max houses per IP, but is there a way to

(1). allow a list of specific IP addresses to have access to a different number of max number of houses and accounts without affecting those who have IP's not on the list?

and...

(2) how would I go about doing exactly that. Suggestions? Ideas? Maybe an example? or a pointer to reference material I can use.

This is something I would think a lot of people could use on their server(s) and even on the official ServUO server because it allows server owners to offer special privies to the few who end up on the IP allowed list.

Just food for thought... now that I'm up and running and ready to try my hand at coding again LOL :)
 
I would probably go about by creating a class IPFeatures or whatever
have your fields set in it like,
int maxHouses
int maxAccounts

later you can even expand on it, like add new stuff.

Then just have a static instance of Dictionary<IP,IPFeatures>

The IPFeatures you can serialize as XML so you can edit it also outside the game.

I think that's how i would do it.
 
Using the example of Exempt IP Addresses in IPLimiter.cs, you could add this code in the same file:

Code:
        public static IPAddress[] Preferreds = new IPAddress[]    //For cases where IPs are given special treatment
        {
            //IPAddress.Parse( "127.0.0.1" ),
        };
        public static bool IsPreferred(IPAddress ip)
        {
            foreach (IPAddress preferred in Preferreds)
            {
                if (ip.Equals(preferred))
                    return true;
            }

            return false;
        }
 
I wouldn't link such a feature to IP's because IP's can change - if the same person logs in from a different IP, how would you then handle the fact they may no longer be eligible for the extra houses? Decay would have to be prevented regardless.

Personally, I'd give them an 'access code' that's bound to their account - a pseudo password that lets them 'log in' to their VIP status (or whatever flags you want to use to say 'hey, I'm special' lol)

Otherwise, I'm not 100% sure. It sounds like it could cause a lot of issues down the road, but it can't hurt to try it out, right?
 
I'll have it implemented by tomorrow... I'm just trying to give admins and families a chance to override the defaults... if their IP is listed.,.. and its really only account number... houses remain the same. I'm not looking to add privies... I just want certain people to have a different account limitation. I decided to do this because I set up a makeshift server today and while testing scripts I want to be able to log in freely on as many accounts as I need... but I also want others to log in and play... i just don't want to give them the ability to create more than the default allowed account numbers. It would be nice for this to be for admins and people who request it (large families) etc.
 
Back