[Mod] No More Guests! [no_guests]

User avatar
kaeza
Moderator
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

[Mod] No More Guests! [no_guests]

by kaeza » Sat Dec 14, 2013 01:36

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:
Attachments
no_guests-1337.0.2.zip
(996 Bytes) Downloaded 446 times
Last edited by kaeza on Sat Dec 14, 2013 19:35, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sat Dec 14, 2013 01:55

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.
Back from the dead!
 

User avatar
addi
Member
 
Posts: 633
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido

by addi » Sat Dec 14, 2013 19:05

dose it work with a latest daily server and the client a 0.4.8 too?
Last edited by addi on Sun Dec 15, 2013 10:01, edited 1 time in total.
 

User avatar
kaeza
Moderator
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sat Dec 14, 2013 19:08

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.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
addi
Member
 
Posts: 633
Joined: Thu Sep 20, 2012 03:16
Location: Black-Forest, Germany
GitHub: adrido
 

User avatar
BrandonReese
Member
 
Posts: 837
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
 

User avatar
Jordach
Member
 
Posts: 4484
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Dec 15, 2013 00:46

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.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
kaeza
Moderator
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Dec 15, 2013 00:49

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).
Last edited by kaeza on Sun Dec 15, 2013 01:00, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

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

by BrunoMine » Sun Dec 15, 2013 03:19

Great idea!
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

Sokomine
Member
 
Posts: 3460
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Sun Dec 15, 2013 04:15

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 :-)
A list of my mods can be found here.
 

User avatar
kaeza
Moderator
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Dec 15, 2013 05:05

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.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

LazyJ
Member
 
Posts: 535
Joined: Wed Sep 12, 2012 12:29
Location: Podunk, Nowhere, USA

by LazyJ » Sun Dec 15, 2013 09:05

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. ;)
Last edited by LazyJ on Sun Dec 15, 2013 09:07, edited 1 time in total.
 

specopsbarton
Member
 
Posts: 12
Joined: Thu Jul 18, 2013 17:38
Location: Poland

by specopsbarton » Mon Jan 20, 2014 13:04

Nice mod, it works very good for me - NO MORE GUESTS!
Last edited by specopsbarton on Mon Jan 20, 2014 13:05, edited 1 time in total.
True Christian don't fight with evil, but transforms it to good on Cross, only on Cross.
 

User avatar
crazyginger72
Member
 
Posts: 69
Joined: Wed Jan 01, 2014 07:57
Location: gone to lunch
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72

by crazyginger72 » Thu Feb 27, 2014 03:53

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
Last edited by crazyginger72 on Thu Feb 27, 2014 04:18, edited 1 time in total.
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
Location: Czech republic, Bohumin
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Thu Feb 27, 2014 09:10

["[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]+
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 

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

by Krock » Thu Feb 27, 2014 16:35

https://github.com/crazyginger72/blocked_usernames/blob/master/init.lua#L51 wrote:
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:
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' :)
Last edited by Krock on Thu Feb 27, 2014 16:36, edited 1 time in total.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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

by BrunoMine » Thu Feb 27, 2014 19:44

The guests will be expelled?
it is possible to warn the prohibition?
Image
Last edited by BrunoMine on Thu Feb 27, 2014 19:45, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
CraigyDavi
Member
 
Posts: 576
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi

by CraigyDavi » Thu Feb 27, 2014 20:09

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.
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
Location: Czech republic, Bohumin
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Thu Feb 27, 2014 20:21

Krock wrote:
https://github.com/crazyginger72/blocked_usernames/blob/master/init.lua#L51 wrote:
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:
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:)
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 

User avatar
crazyginger72
Member
 
Posts: 69
Joined: Wed Jan 01, 2014 07:57
Location: gone to lunch
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72

by crazyginger72 » Thu Feb 27, 2014 21:27

thanks i didnt see that typo guys :)
fixed and updated!
Last edited by crazyginger72 on Thu Feb 27, 2014 21:30, edited 1 time in total.
 

User avatar
rubenwardy
Moderator
 
Posts: 5298
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] No More Guests! [no_guests]

by rubenwardy » Wed Dec 06, 2017 17:58

Version which doesn't stop already registered accounts, and also works with newer guest names:

Code: Select all
-- No guests mod.
-- By VanessaE, sfan5, and kaeza.

local disallowed = {
   ["guest"]            =   "Guest accounts are disallowed on this server.  "..
                        "Please choose a proper username and try again.",
   ["[4a]dm[1il]n"]      =   "That is a clearly false, misleading, or otherwise disallowed username. "..
                        "Please choose a unique username and try again.",
   ["^[0-9]+$"]         =   "All-numeric usernames are disallowed on this server. "..
                        "Please choose a proper username and try again.",
   ["[0-9].-[0-9].-[0-9].-[0-9].-[0-9]"]   =   "Too many numbers in your username. "..
                                    "Please try again with less than five digits in your username.",
   ["^[A-Za-z]+[0-9][0-9][0-9]+$"] = "Please choice your own username. Usernames with letters then 3 or more digits are not allowed"
}

-- Original implementation (in Python) by sfan5
local function judge(msg)
   local numspeakable = 0
   local numnotspeakable = 0
   local cn = 0
   local lastc = '____'
   for c in msg:gmatch(".") do
      c = c:lower()
      if c:find("[aeiou0-9_-]") then
         if cn > 2 and not c:find("[0-9]") then
            numnotspeakable = numnotspeakable + 1
         elseif not c:find("[0-9]") then
            numspeakable = numspeakable + 1
         end
         cn = 0
      else
         if (cn == 1) and (lastc == c) and (lastc ~= 's') then
            numnotspeakable = numnotspeakable + 1
            cn = 0
         end
         if cn > 2 then
            numnotspeakable = numnotspeakable + 1
            cn = 0
         end
         if lastc:find("[aeiou]") then
            numspeakable = numspeakable + 1
            cn = 0
         end
         if not ((lastc:find("[aipfom]") and c == "r") or (lastc == "c" and c == "h")) then
            cn = cn + 1
         end
      end
      lastc = c
   end
   if cn > 0 then
      numnotspeakable = numnotspeakable + 1
   end
   return (numspeakable >= numnotspeakable)
end

minetest.register_on_prejoinplayer(function(name, ip)
   if not minetest.player_exists(name) then
      local lname = name:lower()
      for re, reason in pairs(disallowed) do
         if lname:find(re) then
            return reason
         end
      end

      if #name < 2 then
         return "Too short of a username. "..
               "Please pick a name with at least two letters and try again."
      end

      if not judge(name) and #name > 5 then
         return "Your username just plain looks like gibberish. "..
               "Please pick something readable and try again."
      end
   end
end)
Core Developer | Donate | My Twitter | Mods | Mods 4 Android | Node Box Editor | Minetest Modding Book

Hello profile reader

LgiOxMFYXOqtqVqMPhbw1Bn3oNRvEC7j
 

User avatar
scottwolff
Member
 
Posts: 124
Joined: Sat Apr 30, 2016 06:15
Location: Central Illinois
In-game: scottwolff or some variant of iasiney

Re: [Mod] No More Guests! [no_guests]

by scottwolff » Wed Feb 14, 2018 22:35

I'm beginning to think that the hackers that try to get into my server don't like this mod either. I do. If I remember correctly, it bans names like 123456 or abcdefg?
 

User avatar
Festus1965
Member
 
Posts: 183
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: [Mod] No More Guests! [no_guests]

by Festus1965 » Wed Mar 21, 2018 01:30

First Thank you for this solution !

I started to think about, basically because of this "Xxxxx999" gamer,
Code: Select all
["^[A-Za-z]+[0-9][0-9][0-9]+$"] = "Please choice your own username. Usernames with letters then 3 or more digits are not allowed"
as this ones are also most responsible for
Warnings at Server like
* moved to fast, or
* tried to interact without interact ...
So I got rid of them most.

Now much less work to xban the less users getting in, "pressing" this Warnings sometimes some pages long. My poor Server ..., the rest I can still xban myself, but thinking also about a solution for those who try to cheat - and filling the server actions too fast.

edit: (I) need to update as I see now gamers with Gamer123 are blocked, coming back with Gamer123sd ... ha !

edit: (II) how ?
to get rid of "Name123 hj" after he was blocked with "Name123":
Code: Select all
["^[A-Za-z]+[0-9][0-9][0-9]+[A-Za-z]"] = "Please ..."

and the others I don't like: the capital letter users ?
Code: Select all
["^[A-Z]+[A-Z]+[A-Z]+$"] = "Please ..."

On this Code I suffer since i could program ... as in closed areas you never needed this ... hihi
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 10 guests