Page 1 of 1

[Mod] No More Guests! [no_guests]

PostPosted: Sat Dec 14, 2013 01:36
by kaeza
Hello folks!

Due to a new feature in Minetest, players can be disconnected by mods even before they actually join the game. This has several advantages over the traditional ban on join followed shortly by unban:

  • The player file does not actually get created, thus avoiding cluttering up the world's `players' directory.
  • The join/leave callbacks do not actually get called, thus saving some processing and/or memory (and avoids spamming the chat with join/leave messages).
  • Does not modify the ban list in any way. "Kick user"-type mods usually implement the "kick" as a ban followed shortly by an unban, but this had the problem that if the server crashes between those actions, the player will be banned permanently until manually unbanned.

Now I present you the true and only No More Guests®©™ mod!

All this mod does is simply disconnect all "Guest" accounts (players named "Guest" followed by a number, a feature that some (most?) server owners find annoying.

In addition to this, and thanks to VanessaE for the ideas, it also disallows all-numeric names, names containing enther "guest" or "admin" (case insensitive), and names containing excessive numbers.

Also, thanks to sfan5 for letting me steal^Wborrow his code to detect "junk names". This mod does not allow players with gibberish names.

If you want to support this mod, send your money here.

License:
WTFPL

Dependencies:
None

Screenshots:
High resolution screenshot here.

Downloads:

PostPosted: Sat Dec 14, 2013 01:55
by Evergreen
Did you just Duckroll me?! /me slaps kaeza </kidding>
Anyway, great idea. It's good not to have all those random useless player files cluttering up the world directory.

PostPosted: Sat Dec 14, 2013 19:05
by addi
dose it work with a latest daily server and the client a 0.4.8 too?

PostPosted: Sat Dec 14, 2013 19:08
by kaeza
addi wrote:dose it work if the server is a latest dayli and the client a 0.4.8 too?

This mod requires a build not older than 2013-12-13, so yes, latest daily build should work.
Also, this only needs an updated server; clients continue to work as ever.

PostPosted: Sat Dec 14, 2013 19:15
by addi
very good :)

PostPosted: Sat Dec 14, 2013 22:55
by BrandonReese
I love it. Works perfectly.

PostPosted: Sun Dec 15, 2013 00:46
by Jordach
BrandonReese wrote:I love it. Works perfectly.
Vanessa will love this, I simply don't know if she already uses it on her production server yet. Will need to forward her this mod.

PostPosted: Sun Dec 15, 2013 00:49
by kaeza
Jordach wrote:Vanessa will love this, I simply don't know if she already uses it on her production server yet. Will need to forward her this mod.

She's already using it (actually, a modified version that also disallows all-numeric names). In fact, 7 out of the 8 servers connected to Inchra are using it (ShadowNinja didn't have time to install it yet).

PostPosted: Sun Dec 15, 2013 03:19
by BrunoMine
Great idea!

PostPosted: Sun Dec 15, 2013 04:15
by Sokomine
I'm a bit unhappy with the very name of the mod. It may sound to new players as if guests as such would not welcome - whereas it's only nameless/silly named guestnames that are undesired. Perhaps "no_silly_names" or something like that might sound friendlier :-)

PostPosted: Sun Dec 15, 2013 05:05
by kaeza
Sokomine wrote:I'm a bit unhappy with the very name of the mod. It may sound to new players as if guests as such would not welcome - whereas it's only nameless/silly named guestnames that are undesired. Perhaps "no_silly_names" or something like that might sound friendlier :-)

Well, the name is unimportant as the mod description explains exactly what it does.

Nobody is forced to install this on their server, but in my experience, most of these guests do not bother to choose an appropriate name, and they bother less about everyone's hard work.

I've seen some guests come back, and even become regular users of my server, so this is not a problem for legitimate players.

PostPosted: Sun Dec 15, 2013 09:05
by LazyJ
It's been my experience that server operators and admins are more likely to pay attention to the mod's name than the young and impatient players. ;)

For me, if the mod's name became an issue, I would change the name and leave a credit-line with the author's name, the mod's original name, and perhaps an url to the place to download it, commented-out in the code.

Along that same thought, server operators can change the mod's message to better suit their servers, perhaps even re-write the message in the server's locale language.

Thanks to kaeza and VanessaE for another good and quite useful mod. ;)

PostPosted: Mon Jan 20, 2014 13:04
by specopsbarton
Nice mod, it works very good for me - NO MORE GUESTS!

PostPosted: Thu Feb 27, 2014 03:53
by crazyginger72
I am releasing my fork of this mod now!!!

It not only filters "guest" names but i have added a through "profanity name" filter to the mod and renamed it to be more inviting :)

download here >>>> https://github.com/crazyginger72/blocked_usernames

PostPosted: Thu Feb 27, 2014 09:10
by Pitriss
["[c]+[r]+[4a]+[z]+[y]+[g]+[i1l]+[g]+[3e]+[r]+"] = "that is too close to the server owners name".. //line 51, you probably forgot [n]+

PostPosted: Thu Feb 27, 2014 16:35
by Krock
https://github.com/crazyginger72/blocked_usernames/blob/master/init.lua#L51 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
["[c]+[r]+[4a]+[z]+[y]+[g]+[i1l]+[g]+[3e]+[r]+"] = "that is too close to the server owners name"..
                               "pick a new name",

I would suggest:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
 ["cr[4a]zyg[i1l]ng[3e]r"] = "that is too close to the server owners name"..
                               "pick a new name",

Like the admin preg_match filter is.
EDIT: added missing 'n' :)

PostPosted: Thu Feb 27, 2014 19:44
by BrunoMine
The guests will be expelled?
it is possible to warn the prohibition?
Image

PostPosted: Thu Feb 27, 2014 20:09
by CraigyDavi
brunob.santos wrote:The guests will be expelled?
it is possible to warn the prohibition?


When a guest joins they will get a message telling them that guest accounts are not allowed on here:
Guest accounts are disallowed on this server. Please choose a proper username and try again.

PostPosted: Thu Feb 27, 2014 20:21
by Pitriss
Krock wrote:
https://github.com/crazyginger72/blocked_usernames/blob/master/init.lua#L51 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
["[c]+[r]+[4a]+[z]+[y]+[g]+[i1l]+[g]+[3e]+[r]+"] = "that is too close to the server owners name"..
                               "pick a new name",

I would suggest:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
 ["cr[4a]zyg[i1l]ng[3e]r"] = "that is too close to the server owners name"..
                               "pick a new name",

Like the admin preg_match filter is.
EDIT: added missing 'n' :)


Original solution matches also wit cccccraaaa4a4azzzzyginger AFAIK:)

PostPosted: Thu Feb 27, 2014 21:27
by crazyginger72
thanks i didnt see that typo guys :)
fixed and updated!