Nuclide
Software Development Kit for id Tech
|
Server set message of the day, display to clients. More...
Macros | |
#define | MOTD_LINES 32 |
Hard-limit to how many lines are allowed within a message of the day. More... | |
Functions | |
void | MOTD_LoadDefault (void) |
Called on the server to load the default 'message of the day' file. More... | |
void | MOTD_LoadFromFile (string) |
Called on the server to load a specific 'message of the day' file. More... | |
void | MOTD_Init (void) |
Called by CSQC_Init() on the client game and by initents() on the server game to set up a networked 'message of the day'. More... | |
string | MOTD_GetTextBody (void) |
Returns the full text body of the 'message of the day' that is on the server. More... | |
int | MOTD_GetLineCount (void) |
Returns how many individual lines are present in the message of the day. More... | |
Server set message of the day, display to clients.
Any multiplayer game has the capability of setting a Message of the Day, MotD for short.
Those are usually bits of information about the game server, how to contact the administrator or more.
A NSGameRules based class can usually call MOTD_LoadDefault()
on the server to load the message from the default file location located under gamedir/motd.txt
. The default location can be changed by adjusting the console variable motdfile
.
The client game then receives the MotD using MOTD_GetTextBody()
, in addition to MOTD_GetLineCount()
for figuring out how many lines of text the message takes up.
#define MOTD_LINES 32 |
Hard-limit to how many lines are allowed within a message of the day.
int MOTD_GetLineCount | ( | void | ) |
Returns how many individual lines are present in the message of the day.
Returns the full text body of the 'message of the day' that is on the server.
Can be retrieved by clients via the motd
console command.
Called by CSQC_Init() on the client game and by initents() on the server game to set up a networked 'message of the day'.