Re: [Code] Info channels for newbie implementors

From: Raf (picard@INDIGO.IE)
Date: 08/24/97

On Sun, 24 Aug 1997, Serapi wrote:

> Add these lines directly after
>            sprintf(buf, "\\c04[Info] : %s has advanced to level %d!\\c00\r\n",
>                 GET_NAME(ch), GET_LEVEL(ch));
>       send_to_all(buf);
>       }

Hmm....this would also send the message to the person getting the
level/dying, which isnt very good IMHO. I was looking through the
old-docs, and came a across a thing called send_to_except.
This would be better for these type of Info messages....
Unfortunatly, it doesnt seem to be part of stock anymore... So I wrote
one of my own :)


after void send_to_all(char *messg);
void send_to_except(char *messg, struct char_data *ch);


after the void send_to_char function,

void send_to_except(char *messg, struct char_data *ch);
  struct descriptor_data *i;

  if (messg && ch->desc)
    for (i = descriptor_list; i; i = i->next)
      if (!i->connected)
        if (i != ch->desc)
        SEND_TO_Q(messg, i);


--Implementor of Abysmal MUD 4000
--Temporary site: 4000

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST