[Mod][WIP] Auto kick/ban for many login attempts [too_many_logins]

like2omg
Member
 
Posts: 37
Joined: Sat Nov 30, 2013 20:12

[Mod][WIP] Auto kick/ban for many login attempts [too_many_logins]

by like2omg » Sun Dec 29, 2013 21:39

Hello MineTest community. I'm doing my first attempt at a server mod, which will be my first attempt at a MineTest mod in general.

== Begin off-topic ==
My experiences in Lua started with the ComputerCraft mod for MineCraft, and I seem to have done very well with it there, so carrying over the experience seems to have been working so far on this code I've made.
== End off-topic ==

If the topic's subject line is too brief for you, I'll try to help explain it a little more:
This mod is made for automatically kicking (banning when repeat offender) when an IP address either logs in with too many accounts (just a kick), or when they log in too many times (configurable) within a specific time span (overrides "too many accounts" check; kick or ban; time span is configurable).

I'm having some difficulty with figuring out parts that would actually work with servers (and I'm getting a little bored searching on the forums for answers that are not showing any results in my search terms).

This is what I currently need some help with:
  • Testing and constructive criticism

This is what I might need help with later:
  • Implementing chat commands for editing the variables while the server is running
    Notes: probably extremely dangerous if implementation used incorrectly; may need "acceptable ranges" for input
  • Loading (and saving if chat commands are implemented) configuration from a file

This is what I might (or should) want to do later:
  • Encaspulate parts of the code for slimmer, more readable code
  • Determine a column number for hopefully making cleaner code
  • Document the code better
  • Change the license (I need help on this!)

Currently targeted/tested MineTest version:
0.4.8 stable (not tested since before posted)

Community tested MineTest versions and results:
(none)

Current version:
0.1 (without a license! See "Random notes" at the end of this post) Download

[spoiler=Old version information]too_many_logins.zip -> WIP-0.1 | Initial release, bad intro to MineTest[/spoiler]

Second one without the bulky license, or any license for the matter (help please!), logging

Help is apreciated, and if you helped (with constructive criticsm, pointing to things I overlooked, or something else significant) I might add you to the credits! (License changing is also included in the help that is needed)

Random notes:
At 2013/12/30 17:13 - Having an extremely difficult time with choosing a BSD-family or GPL-family license. Help appreciated.
At 2013/12/30 18:25 - I need some help with making sure I don't submit posts too soon without going through my active edit spree.[/aside]
Attachments
too_many_logins-0.1-unlicensed.zip
(3.19 KiB) Downloaded 118 times
too_many_logins.zip
(3.03 KiB) Downloaded 120 times
Last edited by like2omg on Tue Dec 31, 2013 02:26, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Dec 29, 2013 21:58

Please dont use a non-free license.
 

like2omg
Member
 
Posts: 37
Joined: Sat Nov 30, 2013 20:12

by like2omg » Sun Dec 29, 2013 23:19

PilzAdam wrote:Please dont use a non-free license.

Okay, for me to be able to choose a license, I need some help with deciding one. (I did say in the license I put in there, it is subject to change)
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Mon Dec 30, 2013 11:48

like2omg wrote:This mod is made for automatically kicking (banning when repeat offender) when an IP address either logs in with too many accounts (just a kick), or when they log in too many times (configurable) within a specific time span (overrides "too many accounts" check; kick or ban; time span is configurable).


Why wouldn't you allow many accounts on one IP address and many login's in a specific time span?

- For the login's in a specific time span, you'll need to take in account that players time out or freeze sometimes playing on servers and exit to take a break/have a bite.

Personally I don't see an urge to have this mod (see my question). However for learning to make mods it might be usefull for you and there may also be server owners finding it very usefull (I'm not administering a server).

Also every new modder is very welcome.
 

like2omg
Member
 
Posts: 37
Joined: Sat Nov 30, 2013 20:12

by like2omg » Tue Dec 31, 2013 00:50

Topywo wrote:Why wouldn't you allow many accounts on one IP address and many login's in a specific time span?

It is currently configurable with local variables at the top to say how many connections within a time-span (also a local variable at the top) before it triggers the first kick.
Topywo wrote:- For the login's in a specific time span, you'll need to take in account that players time out or freeze sometimes playing on servers and exit to take a break/have a bite.

See my previous response to your quote.
Topywo wrote:Personally I don't see an urge to have this mod (see my question). However for learning to make mods it might be usefull for you and there may also be server owners finding it very usefull (I'm not administering a server).

It doesn't have to be actively used by a server admin. Currently (if it actually works, have yet to test after adding a bit of stuff), it just does two things:
  1. Checks if A users are already logged in from IP address B
    (can be used to prevent abuse-proxies like some do with Tor)
  2. Checks for C login attempts from IP address B within the time-span of D and kick for first E attempts, otherwise will ban
    (It currently lacks the ability to log the auto-bans)
Topywo wrote:Also every new modder is very welcome.

Why thank you.

-_-
I really need some help with choosing a free license, but I don't want to go through what happened to RetroArch. If I remember correctly, it has a LGPL license which was abused by people to create "clones" that were ad-ified and/or charged money for. Only the ones that used emulators which had a license that couldn't be used in paid avenues was the only ones that could be taken down. (See the author's blog for more details)

EDIT 1: Added missing information to the second list item in this post.
Last edited by like2omg on Tue Dec 31, 2013 00:52, edited 1 time in total.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue Dec 31, 2013 10:09

For the few mods I made, I never dove into the license subject. Mostly I tried to apply the same license as minetest and the same license for used code/images as the ones they are falling under. But I read at least at two places somethig about licenses and minetest:

First a sticky post "Forum information and guidelines":
https://forum.minetest.net/viewtopic.php?id=1271

And second a discussion started by Mauvebic "Why mod licenses are pointless and unenforceable"
https://forum.minetest.net/viewtopic.php?id=2293

I didn't check if you visited one of the IRC channels yet:
http://minetest.net/irc
You might want to try the main one first to discuss about licenses
 

like2omg
Member
 
Posts: 37
Joined: Sat Nov 30, 2013 20:12

by like2omg » Thu Jan 02, 2014 22:10

Topywo wrote:For the few mods I made, I never dove into the license subject. Mostly I tried to apply the same license as minetest and the same license for used code/images as the ones they are falling under. But I read at least at two places somethig about licenses and minetest:

First a sticky post "Forum information and guidelines":
https://forum.minetest.net/viewtopic.php?id=1271

And second a discussion started by Mauvebic "Why mod licenses are pointless and unenforceable"
https://forum.minetest.net/viewtopic.php?id=2293

I didn't check if you visited one of the IRC channels yet:
http://minetest.net/irc
You might want to try the main one first to discuss about licenses

One big issue I'm having is that it seems like, for all of them, a real name is required (which I'd rather not go public for selfish reasons).
This one (don't go to this page kids! Or anyone who gets offended easily!) seems like an easy choice as I am pretty much care-free at this point.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Fri Jan 03, 2014 10:59

like2omg wrote:One big issue I'm having is that it seems like, for all of them, a real name is required (which I'd rather not go public for selfish reasons).


I don't understand this. You mean a real name for the mod? Why is this a big issue?

like2omg wrote:This one (don't go to this page kids! Or anyone who gets offended easily!) seems like an easy choice as I am pretty much care-free at this point.

Doesn't this mean you allow "people to create "clones" that were ad-ified and/or charged money for"?


I guess one of these days I'll want to read more about licences.
 

like2omg
Member
 
Posts: 37
Joined: Sat Nov 30, 2013 20:12

by like2omg » Sun Jan 05, 2014 22:31

Topywo wrote:I don't understand this. You mean a real name for the mod? Why is this a big issue?

I have yet to see anywhere on the web where a license does not show the author's real name.
Topywo wrote:Doesn't this mean you allow "people to create "clones" that were ad-ified and/or charged money for"?

I just gave up and decided "what the heck" after getting bored.
Topywo wrote:I guess one of these days I'll want to read more about licences.

They are completely complex (except ones like WTFPL ... which somehow also has some mature (?) humor on the website's page for it)
 


Return to WIP Mods

Who is online

Users browsing this forum: Bing [Bot] and 9 guests

cron