Nuclide
Software Development Kit for id Tech
motd.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17#ifdef SERVER
18var string autocvar_motdfile = "motd.txt";
19#define MOTD_FILE autocvar_motdfile
20
40#define MOTD_LINES 32
41
43void MOTD_LoadDefault(void);
44
46void MOTD_LoadFromFile(string);
47#endif
48
51void MOTD_Init(void);
52
53#ifdef CLIENT
55string MOTD_GetTextBody(void);
57int MOTD_GetLineCount(void);
58#endif
59 // end of motd
void MOTD_Init(void)
Called by CSQC_Init() on the client game and by initents() on the server game to set up a networked '...
Definition: motd.qc:23
void MOTD_LoadFromFile(string)
Called on the server to load a specific 'message of the day' file.
Definition: motd.qc:60
void MOTD_LoadDefault(void)
Called on the server to load the default 'message of the day' file.
Definition: motd.qc:54
string MOTD_GetTextBody(void)
Returns the full text body of the 'message of the day' that is on the server.
Definition: motd.qc:92
int MOTD_GetLineCount(void)
Returns how many individual lines are present in the message of the day.
Definition: motd.qc:101
var string autocvar_motdfile
Definition: motd.h:18