[Mod] White list [whitelist]

Post Reply
User avatar
ShadowNinja
Developer
Posts: 199
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

[Mod] White list [whitelist]

by ShadowNinja » Post

This is a simple mod that adds a player white list.

Commands:
  • /whitelist add PlayerName
  • /whitelist remove PlayerName
You can also edit the "whitelist.txt" file in the world directory. (The format is one player name per line)

Supported Minetest versions: 0.4.9+
GitHub: https://github.com/ShadowNinja/whitelist
Download: https://github.com/ShadowNinja/whitelis ... master.zip
License: WTFPL

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

Does this kick player on connect?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
ShadowNinja
Developer
Posts: 199
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

by ShadowNinja » Post

hoodedice wrote:Does this kick player on connect?
No, it uses minetest.register_on_prejoinplayer to disconnect players before they even finish connecting and to give them a proper disconnect reason.

Ragnar
Member
Posts: 850
Joined: Thu Oct 25, 2012 15:19
Location: Estonia
Contact:

by Ragnar » Post

Good job =)
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?

User avatar
Enke
Member
Posts: 469
Joined: Fri Nov 15, 2013 02:56
GitHub: NANOsoldierEnke
IRC: Enke
In-game: Enke
Location: The internet

by Enke » Post

Huzzah!
Lush8
ExtraVars for Red Eclipse

<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate

User avatar
LuxAtheris
Member
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Post

This is a good mod.
Very useful.
Believe you can and you’re halfway there.

User avatar
BrunoMine
Member
Posts: 1081
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

works as a notepad?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

User avatar
CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

by CWz » Post

Can you add an option to toggle whitelist mode?
Last edited by CWz on Thu Apr 03, 2014 09:52, edited 1 time in total.
I am CWz on the following servers: VanessaE's servers. If you see CWz on server other then those then chances are it's a Fake. you can contact me on irc.freenode.net or by PM if you are not sure

t3tNU9hNyeSJxFOmM5fmtGxlfoJrcBCg

User avatar
ShadowNinja
Developer
Posts: 199
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

by ShadowNinja » Post

CWz wrote:Can you add an option to toggle whitelist mode?
The whitelist can be enabled and disabled by simply enabling or disabling the mod.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] White list [whitelist]

by AntumDeluge » Post

Thank you ShadowNinja.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re:

by AntumDeluge » Post

CWz wrote:Can you add an option to toggle whitelist mode?
I actually think this is a good idea as well. The reason being, I created the Antum sub-game & I added the whitelist mod to it. However, there may be some server owners that want to use my sub-game without the whitelist mod. I think it would be better for them to have the option to enable/disable it, rather that removing it so that updating would be easier.

Nevermind, I didn't read ShadowNinja's response thoroughly:
ShadowNinja wrote:The whitelist can be enabled and disabled by simply enabling or disabling the mod.
Though, I honestly would prefer using a setting in minetest.conf.

sofar
Developer
Posts: 2132
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Re:

by sofar » Post

AntumDeluge wrote:Though, I honestly would prefer using a setting in minetest.conf.
There already is the per-world setting in world.mt, which is more flexible.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: Re:

by AntumDeluge » Post

sofar wrote:There already is the per-world setting in world.mt, which is more flexible.
How is it more flexible? (honest question, not being sarcastic)

--- Edit ---
Oh, "per-world". That alone should have given me the answer.
Last edited by AntumDeluge on Wed Aug 16, 2017 19:31, edited 2 times in total.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] White list [whitelist]

by AntumDeluge » Post

Created a fork of whitelist.

Differences:
  • Updated to use settings API for Minetest 0.4.16.
  • Adds the following configuration settings:
    • whitelist.enable:
      • Enables/Disables denying access to users not on the whitelist.
      • Disabled by default.
    • whitelist.message:
      • Changes the default message "This server is whitelisted and you are not on the whitelist."
I also sent these changes to ShadowNinja as GitHub pull requests, but I understand if the whitelist.enable setting is not desired in the main branch.

In argument for the configuration setting (though, not a very good one), it would be more flexible with mods that depended on it. But I can't see any reason, at the moment, why a mod would need to depend on it.
Last edited by AntumDeluge on Fri Aug 18, 2017 15:36, edited 1 time in total.

sofar
Developer
Posts: 2132
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] White list [whitelist]

by sofar » Post

AntumDeluge wrote: [*]Enables/Disables denying access to users not on the whitelist.
[*]Disabled by default.[/list]
Why disabled by default? that doesn't make ... any sense.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] White list [whitelist]

by AntumDeluge » Post

sofar wrote:Why disabled by default? that doesn't make ... any sense.
Because I don't think that most server owners that install my sub-game will want to use a whitelist by default. If it's installed as a standalone mod then enabling it by default does make sense. So perhaps I will set it to enabled & create a branch for sub-games with the opposite default behavior.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] White list [whitelist]

by AntumDeluge » Post

Changed default to enabled & created branch for sub-games that defaults to disabled.
Last edited by AntumDeluge on Fri Aug 18, 2017 15:35, edited 1 time in total.

User avatar
Linuxdirk
Member
Posts: 2778
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] White list [whitelist]

by Linuxdirk » Post

Game maintainers should preconfigure nods as they want to use them.

Server management should not be a part of a game anyway.

User avatar
AntumDeluge
Member
Posts: 168
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] White list [whitelist]

by AntumDeluge » Post

Changed behavior to reload whitelist when player joins game. Allows whitelist to be edited while server is running:
whitelist (fork) @ Git commit 5acbf5f

Differences from original:
  • Updated to use settings API for Minetest 0.4.16.
  • Changed license to CC0
  • Whitelist is reloaded when a player joins so can be edited while server is running.
  • Adds the following configuration settings:
    • whitelist.enable:
      • Enables/Disables denying access to users not on the whitelist.
      • Enabled by default (except on subgames branch).
    • whitelist.message:
      • Changes the default message "This server is whitelisted and you are not on the whitelist."

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests