gurba-0.40/
gurba-0.40/bin/
gurba-0.40/lib/
gurba-0.40/lib/cmds/guild/fighter/
gurba-0.40/lib/cmds/monster/
gurba-0.40/lib/cmds/race/catfolk/
gurba-0.40/lib/cmds/race/dwarf/
gurba-0.40/lib/cmds/verb/
gurba-0.40/lib/daemons/data/
gurba-0.40/lib/data/boards/
gurba-0.40/lib/data/messages/
gurba-0.40/lib/data/players/
gurba-0.40/lib/design/
gurba-0.40/lib/domains/gurba/
gurba-0.40/lib/domains/gurba/guilds/fighter/
gurba-0.40/lib/domains/gurba/monsters/
gurba-0.40/lib/domains/gurba/objects/armor/
gurba-0.40/lib/domains/gurba/objects/clothing/
gurba-0.40/lib/domains/gurba/objects/weapons/
gurba-0.40/lib/domains/gurba/vendors/
gurba-0.40/lib/kernel/cmds/admin/
gurba-0.40/lib/kernel/daemons/
gurba-0.40/lib/kernel/include/
gurba-0.40/lib/kernel/lib/
gurba-0.40/lib/kernel/net/
gurba-0.40/lib/kernel/sys/
gurba-0.40/lib/logs/
gurba-0.40/lib/pub/
gurba-0.40/lib/std/modules/languages/
gurba-0.40/lib/std/races/
gurba-0.40/lib/std/races/monsters/
gurba-0.40/lib/wiz/fudge/
gurba-0.40/lib/wiz/spud/
gurba-0.40/src/host/beos/
gurba-0.40/src/host/pc/res/
gurba-0.40/src/kfun/
gurba-0.40/src/lpc/
gurba-0.40/src/parser/
gurba-0.40/tmp/
static object *pSnoopees;
static object *pSnooping;

void create( void ) {
  pSnoopees = ({ });
  pSnooping = ({ });
}

int is_snooped( void ) {
  if( pSnoopees == 0 )
    pSnoopees = ({ });
  if( sizeof( pSnoopees ) > 0 ) {
    return( 1 );
  }
  return( 0 );
}

int is_snooping( object pPlayer ) {
  int i;
  if( pSnooping == 0 )
    pSnooping = ({ });
  for( i = 0; i < sizeof( pSnooping ); i++ ) {
    if( pSnooping[i] == pPlayer )
      return( 1 );
  }
  return( 0 );
}

object *query_snooping( void ) {
  if( pSnooping == 0 )
    pSnooping = ({ });

  pSnooping -= ({ 0 });
  return( pSnooping );
}

object *query_snoopees( void ) {
  if( pSnoopees == 0 )
    pSnoopees = ({ });

  pSnooping -= ({ 0 });
  return( pSnoopees );
}

void do_snoop( string str ) {
  int i,j;
  string *lines;

  lines = explode( str, "\n" );

  for( j = 0; j < sizeof( lines ); j ++ ) {
    for( i = 0; i < sizeof( pSnoopees ); i++ ) {
      pSnoopees[i]->message( "%^RED%^[" + capitalize( this_object()->query_name() ) + "] %^RESET%^" + lines[j] );
    }
  }
}

void add_snoopee( object pPlayer ) {
  if( pSnoopees == 0 )
    pSnoopees = ({ });
  this_object()->message( "%^RED%^You are now beeing snooped by " + capitalize( pPlayer->query_name() ) + ".%^RESET%^" );
  pSnoopees += ({ pPlayer });
}

void remove_snoopee( object pPlayer ) {
  if( pSnoopees == 0 ) 
    pSnoopees = ({ });
  pSnoopees -= ({ pPlayer });
  this_object()->message( "%^RED%^You are no longer beeing snooped by " + capitalize( pPlayer->query_name() ) + ".%^RESET%^" );
}

void add_snooping( object pPlayer ) {
  if( pSnooping == 0 )
    pSnooping = ({ });
  pSnooping += ({ pPlayer });
  this_player()->message( "%^RED%^You are now snooping " + capitalize( pPlayer->query_name() ) + ".%^RESET%^" );
}

void remove_snooping( object pPlayer ) {
  if( pSnooping == 0 )
    pSnooping = ({ });
  pSnooping -= ({ pPlayer });
  this_player()->message( "%^RED%^You are no longer snooping " + capitalize( pPlayer->query_name() ) + ".%^RESET%^" );
}