c0791b52ffaa3636882533a6cb11c9c94bf6ba7e
[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 \r
19 % Le temps d'attente après une erreur de login (mauvais login/pass) : une demie seconde\r
20 % Permet d'éviter (limiter) les attaques par dictionnaire\r
21 -define(TEMPS_ATTENTE_ERREUR_LOGIN, 500). % ms
22
23 % Un message est considéré comme du spam s'il est posté 1 seconde ou moins après le dernier posté
24 -define(DUREE_SPAM, 1000). % ms
25 % Lorsque l'indice de spam d'un utilisateur atteind cette valeur alors il ne peut plus poster pendant un moment
26 -define(INDICE_SPAM_MAX, 6).
27 % Un utilisateur ayant trop spamé est bloqué pendant ce temps 
28 -define(DUREE_BLOCAGE_SPAM, 20000). % ms
29
30
31 % le temps qu'une ip est bannie après avoir voulu s'etre enregistré trop de fois trop rapidement
32 -define(TEMPS_BAN_FLOOD_REGISTER, 60 * 60 * 1000). % 1 heure : en ms
33 % le temps entre deux tentatives de register pour compter un flood
34 -define(TEMPS_FLOOD_REGISTER, 1500). % 1500 ms
35 % après 5 flood l'ip fautive est considérée comme bannie
36 -define(NB_MAX_FLOOD_REGISTER, 5). 
37
38
39 % le nombre max de troll qui peuvent être en attente d'être posté (tous les utilisateurs réunis)
40 -define(NB_MAX_TROLL_WAITING, 10).
41 % chaque admin peut proposer 1 seul troll à la fois
42 -define(NB_MAX_TROLL_WAITING_BY_USER, 2).
43
44
45 % Le jour ainsi que l'heure à laquelle est élu un nouveau troll (lundi à 3 heure du mat)
46 -define(JOUR_ELECTION_TROLL, 1). % 1 = lundi
47 -define(HEURE_ELECTION_TROLL, 3). % 3 heure du matin
48
49
50 % Le dossier utilisé pour le trie (qlc:keysort())
51 -define(KEY_SORT_TEMP_DIR, "/tmp").