playerCanJoin()
-
- Member
- Posts: 117
- Joined: Sat May 28, 2022 00:04
playerCanJoin()
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
List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633
- > cdb_1d60e1a03f83
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: playerCanJoin()
Have you ever read the Lua API documentation?
https://github.com/minetest/minetest/bl ... 5125-L5128
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>
Re: playerCanJoin()
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.
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: playerCanJoin()
If you are using the Auth Redux mod, then this can be accomplished very easily with the following ruleset:
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.
Code: Select all
try "Sorry, we are no longer accepting new players!"
when $is_new eq $true fail
pass now
Then to block or allow new players, use either the chat command "/filter enable" or "/filter disable" respectively.
-
- Member
- Posts: 117
- Joined: Sat May 28, 2022 00:04
Re: playerCanJoin()
Not really lol.Krock wrote: ↑Thu Jun 30, 2022 11:01Have you ever read the Lua API documentation?
https://github.com/minetest/minetest/bl ... 5125-L5128
God bless you.
List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633
- > cdb_1d60e1a03f83
List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633
- > cdb_1d60e1a03f83
Who is online
Users browsing this forum: No registered users and 16 guests