[Mod] Names per IP [names_per_ip]

User avatar
Calinou
Moderator
Posts: 3164
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

[Mod] Names per IP [names_per_ip]

by Calinou » Post

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]

User avatar
Calinou
Moderator
Posts: 3164
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: [Mod] Names per IP [names_per_ip]

by Calinou » Post

Changed privilege from “ban” to “whois”.

User avatar
superschizo
Member
Posts: 121
Joined: Mon Aug 26, 2013 17:08
In-game: uberdorf
Location: Missouri, USA

Re: [Mod] Names per IP [names_per_ip]

by superschizo » Post

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.

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

Re: [Mod] Names per IP [names_per_ip]

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
superschizo
Member
Posts: 121
Joined: Mon Aug 26, 2013 17:08
In-game: uberdorf
Location: Missouri, USA

Re: [Mod] Names per IP [names_per_ip]

by superschizo » Post

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.

User avatar
Wuzzy
Member
Posts: 4065
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Names per IP [names_per_ip]

by Wuzzy » Post

OK, thanks.

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: [Mod] Names per IP [names_per_ip]

by HeroOfTheWinds » Post

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 ;)
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
DS-minetest
Member
Posts: 1141
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Names per IP [names_per_ip]

by DS-minetest » Post

i dont like this mod because then everyone with ban knows so much about you
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

Sol
Member
Posts: 73
Joined: Thu Jul 31, 2014 05:21
In-game: sol

Re: [Mod] Names per IP [names_per_ip]

by Sol » Post

Please, fix this line:

Code: Select all

ipnames.name_per_ip_limit = tonumber(minetest.setting_get("max_names_per_ip")) or 5
There is no such thing as duty. If you know that a thing is right, you want to do it. If you don't want to do it—it isn't right. If it's right and you don't want to do it—you don't know what right is and you're not a man. -- Ayn Rand

User avatar
Calinou
Moderator
Posts: 3164
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: [Mod] Names per IP [names_per_ip]

by Calinou » Post

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.

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

Re: [Mod] Names per IP [names_per_ip]

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
afflatus
Member
Posts: 331
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Names per IP [names_per_ip]

by afflatus » Post

Thanks for this mod. That saved a whole load of aggravation! :-)
Grailtest is dreaming ...

est31
Developer
Posts: 173
Joined: Mon Dec 29, 2014 01:49

Re: [Mod] Names per IP [names_per_ip]

by est31 » Post

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.

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

Re: [Mod] Names per IP [names_per_ip]

by Linuxdirk » Post

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?

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Names per IP [names_per_ip]

by Don » Post

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.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
TenPlus1
Member
Posts: 2867
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Names per IP [names_per_ip]

by TenPlus1 » Post

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...

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

Re: [Mod] Names per IP [names_per_ip]

by Krock » Post

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.
Last edited by Krock on Sun Aug 07, 2016 07:12, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Names per IP [names_per_ip]

by Linuxdirk » Post

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.

User avatar
afflatus
Member
Posts: 331
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Names per IP [names_per_ip]

by afflatus » Post

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.
Grailtest is dreaming ...

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

Re: [Mod] Names per IP [names_per_ip]

by rubenwardy » Post

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.

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

Re: [Mod] Names per IP [names_per_ip]

by Linuxdirk » Post

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.

User avatar
afflatus
Member
Posts: 331
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: [Mod] Names per IP [names_per_ip]

by afflatus » Post

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.
Grailtest is dreaming ...

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

Re: [Mod] Names per IP [names_per_ip]

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] Names per IP [names_per_ip]

by ManElevation » Post

hum were can i get this mod? i dont like the new version
My Public Mods! Discord: Rottweiler Games#3368

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Names per IP [names_per_ip]

by bosapara » Post

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:

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests