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