gotcha. I ended up doing a send_to_all.
I want everyone to know when someone logs in, so
no ACT() needed for this.
In interpreter.c: + means add this in.
Code:
void nanny(struct descriptor_data *d, char *arg)
{
int load_result; /* Overloaded variable */
int player_i;
+ char greetingbuf[MAX_STRING_LENGTH]; /* for login greeting showing players */
next
Code:
greet_mtrigger(d->character, -1);
greet_memory_mtrigger(d->character);
+ sprintf (greetingbuf, "%s has logged in.\r\n", GET_NAME(d->character));
+ send_to_all(greetingbuf);
act("$n has entered the game.", TRUE, d->character, 0, 0, TO_ROOM);
For quitting the game, in act.other.c:
Code:
ACMD(do_quit)
{
+ char goodbyebuf[MAX_STRING_LENGTH]; /* for quit farewell showing players */
if (IS_NPC(ch) || !ch->desc)
return;
if (subcmd != SCMD_QUIT && GET_LEVEL(ch) < LVL_IMMORT)
send_to_char(ch, "You have to type quit--no less, to quit!\r\n");
else if (GET_POS(ch) == POS_FIGHTING)
send_to_char(ch, "No way! You're fighting for your life!\r\n");
else if (GET_POS(ch) < POS_STUNNED) {
send_to_char(ch, "You die before your time...\r\n");
die(ch, NULL);
} else {
act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM);
+ sprintf (goodbyebuf, "%s has logged off.\r\n", GET_NAME(ch));
+ send_to_all(goodbyebuf);
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has quit the game.", GET_NAME(ch));
if (GET_QUEST_TIME(ch) != -1)
quest_timeout(ch);
send_to_char(ch, "Goodbye, friend.. Come back soon!\r\n");
I placed the text around where I added so it can be searched by an editor to locate it.