Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions description.txt

This file was deleted.

4 changes: 3 additions & 1 deletion helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
-- Global Helper Functions
-----------------------------------------------------

get_minetest_config = core.setting_get -- backwards compatibility
get_minetest_config = function( key )
minetest.settings:get( key )
end

function convert_ipv4( str )
local ref = string.split( str, ".", false )
Expand Down
10 changes: 9 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ local auth_filter = AuthFilter( world_path, "greenlist.mt" )
local auth_db = AuthDatabase( world_path, "auth.db" )
local auth_watchdog = AuthWatchdog( )

if minetest.register_on_auth_fail then
if minetest.register_on_authplayer then
minetest.register_on_authplayer( function ( player_name, player_ip, is_success )
if is_success then
return
end
auth_db.on_login_failure( player_name, player_ip )
auth_watchdog.on_failure( convert_ipv4( player_ip ) )
end )
elseif minetest.register_on_auth_fail then
minetest.register_on_auth_fail( function ( player_name, player_ip )
auth_db.on_login_failure( player_name, player_ip )
auth_watchdog.on_failure( convert_ipv4( player_ip ) )
Expand Down
1 change: 1 addition & 0 deletions mod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ name = auth_rx
title = Auth Redux
author = sorcerykid
license = MIT
description = Auth Redux is a drop-in replacement for the builtin authentication handler of Minetest. It is designed from the ground up to be robust and secure enough for use on high-traffic Minetest servers, while also addressing a number of outstanding engine bugs. For more information: https://forum.minetest.net/viewtopic.php?f=9&t=20393