From: Greg Burri Date: Fri, 26 Sep 2008 21:00:56 +0000 (+0000) Subject: FIX #75 : problème de ban d'ip X-Git-Tag: 1.1.3~30 X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=c8744484cda0d18ec3c13f835785dddf14786743;p=euphorik.git FIX #75 : problème de ban d'ip --- diff --git a/js/pageAdmin.js b/js/pageAdmin.js index 0dfeb5b..fc1d51a 100644 --- a/js/pageAdmin.js +++ b/js/pageAdmin.js @@ -148,12 +148,12 @@ euphorik.PageAdmin.prototype.majIPs = function() { function(data) { if (data.reply === "list_banned_ips") { var XHTML = ""; - data.list.each(function(ip) { + data.list.each(function(i, ip) { XHTML += '
' + ip.ip + '|' + '' + ip.remaining_time + '|'; - ip.users.each(function(user) { + ip.users.each(function(j, user) { XHTML += (j > 0 ? ", " : "") + '' + thisPageAdmin.formateur.traitementComplet(user.nick) + '' + (user.login === "" ? "" : ''); diff --git a/modules/erl/euphorik_bd.erl b/modules/erl/euphorik_bd.erl index bef8b1f..e5afe74 100755 --- a/modules/erl/euphorik_bd.erl +++ b/modules/erl/euphorik_bd.erl @@ -652,7 +652,7 @@ can_register(IP) -> if T#ip_table.nb_try_register =:= ?NB_MAX_FLOOD_REGISTER, Delta < ?TEMPS_BAN_FLOOD_REGISTER -> false; true -> - mnesia:write(#ip_table{ + mnesia:write(T#ip_table{ ip = IP, date_last_try_register = now(), nb_try_register = T#ip_table.nb_try_register + if Delta < ?TEMPS_FLOOD_REGISTER -> 1; T#ip_table.nb_try_register > 0 -> -1; true -> 0 end diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 07a7e6f..d561a59 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -13,6 +13,14 @@ + file:/home/gburri/projets/euphorik/branches/1.1/VERSION + file:/home/gburri/projets/euphorik/branches/1.1/js/formateur.js + file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/conversation.js + file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/message.js + file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/pageMinichat.js + file:/home/gburri/projets/euphorik/branches/1.1/js/util.js file:/home/gburri/projets/euphorik/branches/1.1/modules/erl/euphorik_daemon.erl + file:/home/gburri/projets/euphorik/branches/1.1/styles/1/pageMinichat.css + file:/home/gburri/projets/euphorik/branches/1.1/styles/2/pageMinichat.css diff --git a/tools/start_tv.erl b/tools/start_tv.erl index 67b6744..8307a0e 100755 --- a/tools/start_tv.erl +++ b/tools/start_tv.erl @@ -3,7 +3,7 @@ main(_) -> net_kernel:start([tv, shortnames]), - Yaws = yaws@flynux, + Yaws = yaws_dev@flynux, io:format("Connexion à Yaws : ~p~n", [net_adm:ping(Yaws)]), mnesia:start(), mnesia:change_config(extra_db_nodes, nodes()),