FIX #75 : problème de ban d'ip
authorGreg Burri <greg.burri@gmail.com>
Fri, 26 Sep 2008 21:00:56 +0000 (21:00 +0000)
committerGreg Burri <greg.burri@gmail.com>
Fri, 26 Sep 2008 21:00:56 +0000 (21:00 +0000)
js/pageAdmin.js
modules/erl/euphorik_bd.erl
nbproject/private/private.xml
tools/start_tv.erl

index 0dfeb5b..fc1d51a 100644 (file)
@@ -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 += '<div class="ban"><span class="ip">' + ip.ip + '</span>|' +
                      '<span class="temps">' +
                      ip.remaining_time +
                      '</span>|';
-                  ip.users.each(function(user) {
+                  ip.users.each(function(j, user) {
                      XHTML += (j > 0 ? ", " : "") +
                         '<span class="pseudo">' + thisPageAdmin.formateur.traitementComplet(user.nick) + '</span>' +
                         (user.login === "" ? "" : '<span class="login">(' + thisPageAdmin.formateur.traitementComplet(user.login) + ')</span>');
index bef8b1f..e5afe74 100755 (executable)
@@ -652,7 +652,7 @@ can_register(IP) ->
                if T#ip_table.nb_try_register =:= ?NB_MAX_FLOOD_REGISTER, Delta < ?TEMPS_BAN_FLOOD_REGISTER ->\r
                      false;\r
                   true ->\r
-                     mnesia:write(#ip_table{\r
+                     mnesia:write(T#ip_table{\r
                         ip = IP,\r
                         date_last_try_register = now(),\r
                         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\r
index 07a7e6f..d561a59 100644 (file)
         </file>
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/VERSION</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/js/formateur.js</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/conversation.js</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/message.js</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/js/pageMinichat/pageMinichat.js</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/js/util.js</file>
         <file>file:/home/gburri/projets/euphorik/branches/1.1/modules/erl/euphorik_daemon.erl</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/styles/1/pageMinichat.css</file>
+        <file>file:/home/gburri/projets/euphorik/branches/1.1/styles/2/pageMinichat.css</file>
     </open-files>
 </project-private>
index 67b6744..8307a0e 100755 (executable)
@@ -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()),