[Jun 11 2008] - Rumble
Added notification via prompt for new MOTD and news entries. (thanks Jamdog) Added all option to the restore command. (thanks Jamdog) Added new trigger variable hasattached. (thanks Fizban)
This commit is contained in:
17
src/comm.c
17
src/comm.c
@@ -85,6 +85,9 @@
|
||||
#define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
extern time_t motdmod;
|
||||
extern time_t newsmod;
|
||||
|
||||
/* locally defined globals, used externally */
|
||||
struct descriptor_data *descriptor_list = NULL; /* master desc list */
|
||||
int buf_largecount = 0; /* # of large buffers which exist */
|
||||
@@ -1212,6 +1215,20 @@ static char *make_prompt(struct descriptor_data *d)
|
||||
len += count;
|
||||
}
|
||||
|
||||
if (GET_LAST_NEWS(d->character) < newsmod)
|
||||
{
|
||||
count = snprintf(prompt + len, sizeof(prompt) - len, "(news) ");
|
||||
if (count >= 0)
|
||||
len += count;
|
||||
}
|
||||
|
||||
if (GET_LAST_MOTD(d->character) < motdmod)
|
||||
{
|
||||
count = snprintf(prompt + len, sizeof(prompt) - len, "(motd) ");
|
||||
if (count >= 0)
|
||||
len += count;
|
||||
}
|
||||
|
||||
if (len < sizeof(prompt))
|
||||
strncat(prompt, "> ", sizeof(prompt) - len - 1); /* strncat: OK */
|
||||
} else if (STATE(d) == CON_PLAYING && IS_NPC(d->character))
|
||||
|
||||
Reference in New Issue
Block a user