b8a5b38a9d285fef6b778f976018bda7b330f8e3
[euphorik.git] / modules / include / euphorik_defines.hrl
1 % Copyright 2008 Grégory Burri\r
2 %\r
3 % This file is part of Euphorik.\r
4 %\r
5 % Euphorik is free software: you can redistribute it and/or modify\r
6 % it under the terms of the GNU General Public License as published by\r
7 % the Free Software Foundation, either version 3 of the License, or\r
8 % (at your option) any later version.\r
9 %\r
10 % Euphorik is distributed in the hope that it will be useful,\r
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 % GNU General Public License for more details.\r
14 %\r
15 % You should have received a copy of the GNU General Public License\r
16 % along with Euphorik.  If not, see <http://www.gnu.org/licenses/>.\r
17
18 % Version de la BD
19 -define(VERSION_BD, 1).
20 \r
21 % Le temps d'attente après une erreur de login (mauvais login/pass) : une demie seconde\r
22 % Permet d'éviter (limiter) les attaques par dictionnaire\r
23 -define(TEMPS_ATTENTE_ERREUR_LOGIN, 500). % ms
24
25 % Un message est considéré comme du spam s'il est posté 1 seconde ou moins après le dernier posté
26 -define(DUREE_SPAM, 1000). % ms
27 % Lorsque l'indice de spam d'un utilisateur atteind cette valeur alors il ne peut plus poster pendant un moment
28 -define(INDICE_SPAM_MAX, 6).
29 % Un utilisateur ayant trop spamé est bloqué pendant ce temps 
30 -define(DUREE_BLOCAGE_SPAM, 20000). % ms
31
32
33 % le temps qu'une ip est bannie après avoir voulu s'etre enregistré trop de fois trop rapidement
34 -define(TEMPS_BAN_FLOOD_REGISTER, 60 * 60 * 1000). % 1 heure : en ms
35 % le temps entre deux tentatives de register pour compter un flood
36 -define(TEMPS_FLOOD_REGISTER, 1500). % 1500 ms
37 % après 5 flood l'ip fautive est considérée comme bannie
38 -define(NB_MAX_FLOOD_REGISTER, 5). 
39
40
41 % le nombre max de troll qui peuvent être en attente d'être posté (tous les utilisateurs réunis)
42 -define(NB_MAX_TROLL_WAITING, 10).
43 % chaque admin peut proposer 1 seul troll à la fois
44 -define(NB_MAX_TROLL_WAITING_BY_USER, 2).
45
46
47 % Le jour ainsi que l'heure à laquelle est élu un nouveau troll (lundi à 3 heure du mat)
48 -define(JOUR_ELECTION_TROLL, 1). % 1 = lundi
49 -define(HEURE_ELECTION_TROLL, 3). % 3 heure du matin