Implementing a Whitelist

General discussion about Life is Feudal MMO and Life is Feudal: Your Own, The main section and backbone of the forums.
User avatar
Windrider739
 
Posts: 10
Joined: 03 Jan 2016, 02:30

Implementing a Whitelist

Post by Windrider739 » 25 Feb 2016, 03:10

Hey, folks. My server has gotten ungodly popular and now I've trying to find a way to whitelist it. No one anywhere seems to be willing to help me. Hopefully it's different here.

I want to set up a whitelist and set it so only my current players can access the server. Then as my regular load wanes, I can turn it off for a few days. Right now I sit at 50+ players at all times, and I have over 60 people waiting to get in during Judgement Hour.
Image

209.170.149.186:21687

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 25 Feb 2016, 20:39

Windrider739 wrote:I want to set up a whitelist and set it so only my current players can access the server. Then as my regular load wanes, I can turn it off for a few days. Right now I sit at 50+ players at all times, and I have over 60 people waiting to get in during Judgement Hour.

You can use BasilMod::MaxPlayers, which allow you to specify priority accounts who can connect the game.

Download both files, place them to "BasilMod/MaxPlayers/" folder, and add
Code: Select all
exec("basilmod/maxplayers/maxplayers.cs");

to your server main.cs file.

For your purpose you can use following config.cs
Code: Select all
//Maximum number of players allowed
$BasilMod::MaxPlayers::MaxPlayers = 64;
//Reserved clots
$BasilMod::MaxPlayers::PrioritySlots = 40;
//Priority accounts (those are account IDs, not Character IDs)
$BasilMod::MaxPlayers::PriorityAccounts = "2 23 61"; //specify your constant players, you can add more than 40 players.

//Allow Priority players always join (even if no priority slots left)
$BasilMod::MaxPlayers::PriorityAlwaysJoin = true;

//Message to show when normal player to kick
$BasilMod::MaxPlayers::KickMessage = "Priority player joined server.";

This will result in 40 reserved slots for priority accounts, and 24 free slots for other players. Non-priority players will be unable to join the server, if no free slots available.

If PrioritySlots value equals MaxPlayers value, non-listed accounts players cannot join the server.
Last edited by Custodian on 02 Feb 2017, 19:29, edited 1 time in total.

User avatar
Windrider739
 
Posts: 10
Joined: 03 Jan 2016, 02:30

Re: Implementing a Whitelist

Post by Windrider739 » 26 Feb 2016, 21:10

This looks like it would be good. I've tried to use a few of your mods before and had mixed results with my players. Would this require them to download anything or alter any of their files?
Image

209.170.149.186:21687

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 26 Feb 2016, 21:19

Windrider739 wrote:This looks like it would be good. I've tried to use a few of your mods before and had mixed results with my players. Would this require them to download anything or alter any of their files?

MaxPlayers is server side only mod(like motd/safezone/etc), no client downloads required.
As for other my mods, basilmod::pack does not require any files modification to game files now.


MasterChief
True Believer
 
Posts: 55
Joined: 04 Oct 2014, 11:11

Re: Implementing a Whitelist

Post by MasterChief » 26 Feb 2016, 21:27

mod works fine for me ;)


Catherine
 
Posts: 31
Joined: 01 Mar 2016, 10:00

Re: Implementing a Whitelist

Post by Catherine » 17 Apr 2016, 09:11

Custodian wrote:
Windrider739 wrote:I want to set up a whitelist and set it so only my current players can access the server. Then as my regular load wanes, I can turn it off for a few days. Right now I sit at 50+ players at all times, and I have over 60 people waiting to get in during Judgement Hour.

You can use BasilMod::MaxPlayers, which allow you to specify priority accounts who can connect the game.

Download both files, place them to "BasilMod/MaxPlayers/" folder, and add
Code: Select all
exec("basilmod/maxplayers/maxplayers.cs");

to your server main.cs file.

For your purpose you can use following config.cs
Code: Select all
//Maximum number of players allowed
$BasilMod::MaxPlayers::MaxPlayers = 64;
//Reserved clots
$BasilMod::MaxPlayers::PrioritySlots = 40;
//Priority accounts (those are account IDs, not Character IDs)
$BasilMod::MaxPlayers::PriorityAccounts = "2 23 61"; //specify your constant players, you can add more than 40 players.

//Allow Priority players always join (even if no priority slots left)
$BasilMod::MaxPlayers::PriorityAlwaysJoin = true;

This will result in 40 reserved slots for priority accounts, and 24 free slots for other players. Non-priority players will be unable to join the server, if no free slots available.

If PrioritySlots value equals MaxPlayers value, non-listed accounts players cannot join the server.



i have no basilmod folder yet. where do i make the basilmod folder where i have to put the files in?

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Implementing a Whitelist

Post by Leaf » 16 May 2016, 14:32

I'm assuming the priority players are identified by their steam 64 IDs?

Like 76561198087780559?

So I'd add priority accounts by adding

$BasilMod::MaxPlayers::PriorityAccounts = "76561198087780559";
$BasilMod::MaxPlayers::PriorityAccounts = "88561198087780522";
$BasilMod::MaxPlayers::PriorityAccounts = "99561198087780533";

etc?

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 16 May 2016, 14:41

Leaf wrote:I'm assuming the priority players are identified by their steam 64 IDs?
etc?

No, you should use Account Ids from LiF database `account`table.
You can use steam64 IDs to locate your LiF account Id.

As shown:
Code: Select all
$BasilMod::MaxPlayers::PriorityAccounts = "2 23 61";

Means that accounts 2, 23 and 61 will be able to join into priority slot.

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Implementing a Whitelist

Post by Leaf » 16 May 2016, 14:59

One last question.


//Allow Priority players always join (even if no priority slots left)
$BasilMod::MaxPlayers::PriorityAlwaysJoin = true;

This would let a priority account join and kick a random non-priority account to make an opening?



And under accounts table, all I have are 0/1 (banned or not) and steam 64 ID numbers.

Ahh... Character table. got it. =)
Last edited by Leaf on 16 May 2016, 15:05, edited 2 times in total.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 16 May 2016, 15:03

Leaf wrote:This would let a priority account join and kick a random non-priority account to make an opening?

Random player will be kicked (may result in kick of another priority player).
This mod will eventually evolve into some kind of server queue mod to provide more flexible queue priority handling.

User avatar
Karabas
Alpha Tester
 
Posts: 323
Joined: 23 May 2014, 17:45
Location: Moscow

Re: Implementing a Whitelist

Post by Karabas » 16 May 2016, 15:44

hmm i would not play on a server with such mod..... at least these server must be marked "private" - not "open"
Gray tag. Gray axe.Image
Image


Helena
 
Posts: 12
Joined: 23 Jan 2016, 17:46

Re: Implementing a Whitelist

Post by Helena » 16 Sep 2016, 04:34

If we instal the Mod, no more player's number is indicated in the console. Besides, our restart-script as well as the alive check does not function any more
Any Idea how to fix it?

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 16 Sep 2016, 07:30

Te_quiero wrote:If we instal the Mod, no more player's number is indicated in the console. Besides, our restart-script as well as the alive check does not function any more
Any Idea how to fix it?

The only thing I can tell you based on the info you have provided, your restart script is not compatible with the mod.
Share your server log with me, if you want extra details.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 16 Sep 2016, 13:05

Te_quiero wrote:If we instal the Mod, no more player's number is indicated in the console.

Mod has been updated. Re-download mod files.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 05 Oct 2016, 19:38

BasilMod::MaxPlayers has been updated to v3 and now compatible with LiF 1.1.4.6.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 31 Jan 2017, 09:35

BasilMod::MaxPlayers has been updated to v4.

New configuration option added:
Code: Select all
//Message to show when normal player to kick
$BasilMod::MaxPlayers::KickMessage = "Priority player joined server.";


Mod now works as follows:
You define max players on the server, and priority(reserved) slots amount.

Normal Player:
- can join server if there is free slot availabe (i.e. 63/64 on the server right now). Player can occupy priority slot, but such player can be kicked later.

Priority Player:
- can join server if there is free slot available
- if server is full and priority players count is less than priority slots number, random normal (non-priority) player will be kicked to free up the priority slot.
- if all priority slots are taken by priority players, player can join only if "$BasilMod::MaxPlayers::PriorityAlwaysJoin" is set to true. Normal player will be kicked.
- if server is full of priority players, new priority player cannot join.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 02 Feb 2017, 19:22

BasilMod::MaxPlayers has been updated to v5 and now compatible with LiF 64bit.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 16 Aug 2017, 23:27

BasilMod::MaxPlayers updated to v6.

User avatar
Ishamael
Alpha Tester
 
Posts: 442
Joined: 07 Feb 2014, 21:55

Re: Implementing a Whitelist

Post by Ishamael » 17 Aug 2017, 09:33

Why update this? Nobody is going to need this when the MMO starts.
"Yes, Betrayer of Hope. They gave me the name to revile me, but I will yet make them kneel and worship it."
—Ishamael

Dovie'andi se tovya sagain.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: Implementing a Whitelist

Post by Custodian » 17 Aug 2017, 09:48

Ishamael wrote:Why update this? Nobody is going to need this when the MMO starts.

If you have not noticed, people plays LiF:YO on private servers.

Return to General Discussion

cron