From c8744484cda0d18ec3c13f835785dddf14786743 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Fri, 26 Sep 2008 21:00:56 +0000 Subject: [PATCH] =?utf8?q?FIX=20#75=20:=20probl=C3=A8me=20de=20ban=20d'ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/pageAdmin.js | 4 ++-- modules/erl/euphorik_bd.erl | 2 +- nbproject/private/private.xml | 8 ++++++++ tools/start_tv.erl | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) 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()), -- 2.45.2