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