Page 1 of 2

[Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 10:35
by Calinou
Limits number of accounts a single IP can create. Based on Krock's names_per_ip mod.

This mod is originating from Carbone. You don't install this mod if you're playing that particular game; it's already included and enabled by default there.

Download

No dependencies.
License for code: WTFPL


Commands

/whois <name>: gets the IP address of a player and returns all their accounts. [whois]

Settings

max_names_per_ip: limits the maximal amount of accounts. The local player (127.0.0.1) can always create as many accounts as they want. [5]

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 16:30
by Calinou
Changed privilege from “ban” to “whois”.

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 19:32
by superschizo
I have 6 people in my household including myself, all of whom play minetest to a varying extent. While it's still unlikely that my household will be affected at this point since some of the kids are not allowed to play online worlds without supervision due to their age and not everyone goes to online worlds anyway, I want to point out that my IP address has a legitimate reason to have more than 5 accounts. In several years, this could be a problem for us.

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 20:07
by Krock
superschizo wrote:In several years, this could be a problem for us.
So, this isn't an important problem. It's possible to add exceptions, too.

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 20:18
by superschizo
No, it is not an important problem for me and I recognize the need to protect servers from trolls and griefers. I just wanted to point out that it could negatively affect some large households. It is good to hear that exceptions can be added.

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jul 16, 2014 22:31
by Wuzzy
OK, thanks.

Re: [Mod] Names per IP [names_per_ip]

Posted: Thu Jul 17, 2014 01:04
by HeroOfTheWinds
Neat mod, Calinou! Definitely helps with the b.s. where people try to be multiple people at once just to troll.

Wuzzy, you do have some points there. You just forgot to put #endrant ;)

Re: [Mod] Names per IP [names_per_ip]

Posted: Fri Jul 18, 2014 20:18
by Desour
i dont like this mod because then everyone with ban knows so much about you

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Aug 10, 2014 08:36
by Sol
Please, fix this line:

Code: Select all

ipnames.name_per_ip_limit = tonumber(minetest.setting_get("max_names_per_ip")) or 5

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Aug 10, 2014 15:56
by Calinou
Sol wrote:Please, fix this line:

Code: Select all

ipnames.name_per_ip_limit = tonumber(minetest.setting_get("max_names_per_ip")) or 5
Added.

Re: [Mod] Names per IP [names_per_ip]

Posted: Sat Aug 16, 2014 09:27
by Krock
So, I've made some little changes on the base of this fork.
Not sure if it's the correct place here but.. anyway.

Features ahead:
- Added whitelist (for players which require more than 2 accounts)
- Added timestamps to forget IPs after two weeks

Features behind:
- No "whois" privilege, it still runs over "ban"

https://github.com/SmallJoker/names_per_ip

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Jan 21, 2015 18:30
by afflatus
Thanks for this mod. That saved a whole load of aggravation! :-)

Re: [Mod] Names per IP [names_per_ip]

Posted: Sat Apr 04, 2015 19:27
by est31
Calinou, can you publish the mod on notabug or another git website (I know notabug is your favourite)? I don't like to touch zip blobs, git is better for updating and other tasks.

Re: [Mod] Names per IP [names_per_ip]

Posted: Sat Apr 04, 2015 22:38
by Linuxdirk
Just a quick question: How useful is this in a world where most people who connect to the internet with non-business accounts get a new IP address on every connect?

Re: [Mod] Names per IP [names_per_ip]

Posted: Sat Apr 04, 2015 22:54
by Don
We use it on our server and it helps. People will keep joining with a new name to get the initial items. They put them in an unlocked chest and get a bunch of stuff.
As far as IP changing, I have had the same IP for years.

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Apr 05, 2015 07:16
by TenPlus1
We use it on Xanadu server where you get the odd player using multiple ip's for the same name, we limit names to 3 only so if we find a player changing ip's to get more they get limited...

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Apr 05, 2015 07:47
by Krock
Sadly, there's not much we can do against dynamic IPs. It's unfair but these players can ban evade easier than those with static IPs. Using the MAC address for that would violate the privacy, so it might be better to keep it this way.

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Apr 05, 2015 11:51
by Linuxdirk
Don wrote:As far as IP changing, I have had the same IP for years.
That may be like this for you. But most of the world has dynamic dial-up IPs that change with every re-connect.

Re: [Mod] Names per IP [names_per_ip]

Posted: Tue Apr 07, 2015 13:44
by afflatus
It works fine Linuxdirk - your problem is theoretical, in practice most players seem to keep the same IPs. Banning players should be a last resort anyway. It is incredibly useful.

Re: [Mod] Names per IP [names_per_ip]

Posted: Wed Apr 08, 2015 19:03
by rubenwardy
Their router would need to be turned off and on again for the IP to change (ie: reconnect.) And this probably doesn't happen much in normal houses.

Of course, there could be a power cut or a time out.

Re: [Mod] Names per IP [names_per_ip]

Posted: Thu Apr 09, 2015 20:29
by Linuxdirk
Well, at least in Germany (and almost any European countries) there is a forced reconnect every 24 hours causing a new IP address every 24 hours.

Re: [Mod] Names per IP [names_per_ip]

Posted: Thu Apr 09, 2015 22:20
by afflatus
S, to answer your original question Linuxdirk, the mod works because even if the IP changes, the household will all use the same IP. So if you ban (or whitelist) by playername, their household is always affected.

Re: [Mod] Names per IP [names_per_ip]

Posted: Fri Apr 10, 2015 06:22
by Krock
The solution for this would be to ban mac addresses but that's under the cathegory "privacy" and isn't an option with the current API functions.

Re: [Mod] Names per IP [names_per_ip]

Posted: Tue Jul 24, 2018 19:13
by ManElevation
hum were can i get this mod? i dont like the new version

Re: [Mod] Names per IP [names_per_ip]

Posted: Sun Aug 26, 2018 20:39
by bosapara
Just inform about mod can crash server

Code: Select all

2018-08-26 22:43:01: ACTION[Main]: Kicking players due to shutdown...
2018-08-26 22:43:10: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'names_per_ip' in callback environment_Step(): F:\sky\server\bin\..\mods\names_per_ip/functions.lua:86: attempt to concatenate a nil value
2018-08-26 22:43:10: ERROR[Main]: stack traceback:
2018-08-26 22:43:10: ERROR[Main]: 	F:\sky\server\bin\..\mods\names_per_ip/functions.lua:86: in function 'save_data'
2018-08-26 22:43:10: ERROR[Main]: 	F:\sky\server\bin\..\mods\names_per_ip\init.lua:100: in function <F:\sky\server\bin\..\mods\names_per_ip\init.lua:94>
2018-08-26 22:43:10: ERROR[Main]: 	F:\sky\server\bin\..\builtin\game\register.lua:420: in function <F:\sky\server\bin\..\builtin\game\register.lua:400>
2018-08-26 22:43:10: ERROR[Main]: stack traceback: