]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/chat.qh
Merge branch 'bones_was_here/805' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / chat.qh
1 #pragma once
2
3 float autocvar_g_chat_flood_burst;
4 float autocvar_g_chat_flood_burst_team;
5 float autocvar_g_chat_flood_burst_tell;
6 float autocvar_g_chat_flood_lmax;
7 float autocvar_g_chat_flood_lmax_team;
8 float autocvar_g_chat_flood_lmax_tell;
9 bool autocvar_g_chat_flood_notify_flooder;
10 float autocvar_g_chat_flood_spl;
11 float autocvar_g_chat_flood_spl_team;
12 float autocvar_g_chat_flood_spl_tell;
13 int autocvar_g_chat_nospectators;
14 bool autocvar_g_chat_teamcolors;
15 bool autocvar_g_chat_tellprivacy;
16
17 const float NUM_NEAREST_ENTITIES = 4;
18 entity nearest_entity[NUM_NEAREST_ENTITIES];
19 float nearest_length[NUM_NEAREST_ENTITIES];
20
21 .float floodcontrol_chat;
22 .float floodcontrol_chatteam;
23 .float floodcontrol_chattell;
24 .float floodcontrol_voice;
25 .float floodcontrol_voiceteam;
26
27 #define CHAT_NOSPECTATORS() ((autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !warmup_stage))
28
29 int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodcontrol);
30
31 string NearestLocation(vector p);
32
33 string formatmessage(entity this, string msg);
34
35 /// \brief Print the string to the client's chat.
36 /// \param[in] client Client to print to.
37 /// \param[in] text Text to print.
38 void PrintToChat(entity client, string text);
39
40 /// \brief Print the string to the client's chat if the server cvar "developer"
41 /// is not 0.
42 /// \param[in] client Client to print to.
43 /// \param[in] text Text to print.
44 void DebugPrintToChat(entity client, string text);
45
46 /// \brief Prints the string to all clients' chat.
47 /// \param[in] text Text to print.
48 void PrintToChatAll(string text);
49
50 /// \brief Prints the string to all clients' chat if the server cvar "developer"
51 /// is not 0.
52 /// \param[in] text Text to print.
53 void DebugPrintToChatAll(string text);
54
55 /// \brief Print the string to chat of all clients of the specified team.
56 /// \param[in] team_num Team to print to. See NUM_TEAM constants.
57 /// \param[in] text Text to print.
58 void PrintToChatTeam(int team_num, string text);
59
60 /// \brief Print the string to chat of all clients of the specified team if the
61 /// server cvar "developer" is not 0.
62 /// \param[in] team_num Team to print to. See NUM_TEAM constants.
63 /// \param[in] text Text to print.
64 void DebugPrintToChatTeam(int team_num, string text);