/***************************************************************************
* (c) 2000 TAKA and the GHOST DANCER MUD PROJECT TEAM
*
* You may use this code provided you accept it's usage agreements
*
* Usage agreement
* 1) Is that you do not remove or modify this comment block.
* 2) You must give due credit in the help files
* 3) You email me at a_ghost_dancer@excite.com
* this helps me judge what snippets are popular and i welcome
* any ideas and if i find them worthy i may decide to code them
* for GHOST and distribute them on our page.
* 4) You must abid by all other ROM and MERC licences
* 5) Finally any improvements/bugs you find or make please share them
* so we can continue to put out quality snippets.
*
* Last thank you to all the ROM amd MERC folks for this wounderful code
* base know as ROM.
*
* The Ghost Dancer MUD Project Team and me TAKA thank you
* for your interest.
*
* You can email me at:
* TAKA
* a_ghost_dancer@excite.com
*
***************************************************************************/
For interp.c (put with other command declerations):
{ "commstat", do_comm_stat, POS_SLEEPING, 0, LOG_NEVER, 0 },
{ "cstat", do_comm_stat, POS_SLEEPING, 0, LOG_NEVER, 0 },
For interp.h (put anywhere on the list):
DECLARE_DO_FUN( do_comm_stat );
For act_info.c (put anywhere, I suggest the end):
better create and act_newc.c
/*
I saw comm stat on dark scapes I liked it and it and swiped it
the idea for me started there the code however is all original
-- Taka
*/
void do_comm_stat( CHAR_DATA *ch, char *argument )
{
DESCRIPTOR_DATA *d;
char buf[MAX_INPUT_LENGTH + 80];
send_to_char("{W Player gos auc mus ? quo gra rac sho qui AFK dea{x\n\r",
ch);
for ( d = descriptor_list; d != NULL; d = d->next )
{
CHAR_DATA *victim;
victim = (d->original != NULL) ? d->original : d->character;
if ( d->connected != CON_PLAYING || !can_see(ch, d->character ))
continue;
sprintf(buf, "{W%-10s{G %s %s %s %s %s %s %s %s %s %s %s\n\r",
victim->name, IS_SET(victim->comm,COMM_NOGOSSIP)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOAUCTION)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOMUSIC)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOQUESTION)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOQUOTE)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOGRATS)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NORACE)?"OFF":"ON ",
IS_SET(victim->comm,COMM_NOSHOUT)?"OFF":"ON ",
IS_SET(victim->comm,COMM_QUIET)?"{RON {x":"{ROFF{x",
IS_SET(victim->comm,COMM_AFK)?"{YYes{x":"{YNo {x",
IS_SET(victim->comm,COMM_DEAF)?"{DON {x":"{DOFF{x");
send_to_char(buf, ch);
if (IS_IMMORTAL(ch))
{
sprintf(buf, "{MGod channel: %s %s\n\r",
IS_SET(victim->comm,COMM_NOWIZ)?"OFF ":" ON ",
IS_SET(victim->comm,COMM_SNOOP_PROOF)?"{CImmune to snooping.{x\n\r":
"{CNot Immune to snooping.{x\n\r");
send_to_char(buf, ch);
}
}
return;
}