Add server admin messaging functionality
It's occasionally important for public servers to notify all the players. Sending a mail is not reliable, as not everyone wants to break conduct, or have mail on. This adds a compile-time defined filename, which NetHack will monitor. The contents of the file are in the same format as SIMPLE_MAIL: "sender:message" on one line.
This commit is contained in:
@@ -1062,6 +1062,7 @@ E void FDECL(nocmov, (int x, int y));
|
||||
#ifdef UNIX
|
||||
E void NDECL(getmailstatus);
|
||||
#endif
|
||||
E void NDECL(ck_server_admin_msg);
|
||||
E void NDECL(ckmailstatus);
|
||||
E void FDECL(readmail, (struct obj *));
|
||||
#endif /* MAIL */
|
||||
|
||||
@@ -193,7 +193,9 @@
|
||||
|
||||
/* If SIMPLE_MAIL is defined, the mail spool file format is
|
||||
"sender:message", one mail per line, and mails are
|
||||
read within game, from demon-delivered mail scrolls */
|
||||
read within game, from demon-delivered mail scrolls.
|
||||
The mail spool file will be deleted once the player
|
||||
has read the message. */
|
||||
/* #define SIMPLE_MAIL */
|
||||
|
||||
#ifndef MAILCKFREQ
|
||||
@@ -203,6 +205,16 @@
|
||||
|
||||
#endif /* MAIL */
|
||||
|
||||
/* If SERVER_ADMIN_MSG is defined and the file exists, players get
|
||||
a message from the user defined in the file. The file format
|
||||
is "sender:message" all in one line. */
|
||||
/* #define SERVER_ADMIN_MSG "adminmsg" */
|
||||
#ifndef SERVER_ADMIN_MSG_CKFREQ
|
||||
/* How often admin message file is checked for new messages, in turns */
|
||||
#define SERVER_ADMIN_MSG_CKFREQ 25
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Some terminals or terminal emulators send two character sequence "ESC c"
|
||||
* when Alt+c is pressed. The altmeta run-time option allows the user to
|
||||
|
||||
Reference in New Issue
Block a user