playerCanJoin()

Post Reply
ChristienChapman
Member
Posts: 117
Joined: Sat May 28, 2022 00:04

playerCanJoin()

by ChristienChapman » Post

Minetest could implement a playerCanJoin() function very easily. Essentially the function would run some code that sets a boolean for player can join and lets people join a server. Now if that boolean were to be false, it would return a kick and a message letting the user know that no new players can join. Really its just a boolean and 2 if statementes but you could use playerCanJoin() and playerCannotJoin() to set the boolean true or false. Dumb idea?
God bless you.

List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633

- > cdb_1d60e1a03f83

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: playerCanJoin()

by Krock » Post

Have you ever read the Lua API documentation?

https://github.com/minetest/minetest/bl ... 5125-L5128
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
TenPlus1
Member
Posts: 3714
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: playerCanJoin()

by TenPlus1 » Post

I do this already on Xanadu server, we have a /border command to open and close borders so we can allow or stop new players from entering. Also a /limit command can revoke privs from a player and stop them logging in.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: playerCanJoin()

by sorcerykid » Post

If you are using the Auth Redux mod, then this can be accomplished very easily with the following ruleset:

Code: Select all

try "Sorry, we are no longer accepting new players!"
when $is_new eq $true fail
pass now
https://github.com/sorcerykid/auth_rx/w ... h-Rulesets

Then to block or allow new players, use either the chat command "/filter enable" or "/filter disable" respectively.

ChristienChapman
Member
Posts: 117
Joined: Sat May 28, 2022 00:04

Re: playerCanJoin()

by ChristienChapman » Post

Krock wrote:
Thu Jun 30, 2022 11:01
Have you ever read the Lua API documentation?

https://github.com/minetest/minetest/bl ... 5125-L5128
Not really lol.
God bless you.

List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633

- > cdb_1d60e1a03f83

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest