[Package Index | Mudlib Index | Effect Index]
File /obj/handlers/scry_handler.c
This is a handler that's invoced when people are scried as a way to call back
to the scryee.  You can register for various kinds of events - PERSON, ROOM,
PERSON_INDIRECT and CONTINUOUS, of which the last has to be paired with at
least one of the previous three.
If the handler is dested, scry_handler_dested() is called on all registered
objects with the supplied data.Written by Woom
Started October 18, 2004
Includes
This class includes the following files /include/scry_handler.hMethod index
Public Functions
These are functions that everyone can access.
- 
clean_callbacks
void clean_callbacks()
- 
clean_up
int clean_up()
- 
person_scried
void person_scried(object person,
                   int flag,
                   object scryer)
   
This function should be called by all methods of scrying when someone is
scried, with appropriate args.
- Parameters:
person - The person being scried
flag - The kind of scrying
 
- 
register_for_scries
int register_for_scries(int flag,
                        object ob,
                        mixed thing,
                        string func,
                        mixed * data ...)
 
This is the function to call to register an object for callbacks.
- Parameters:
flag - A bitmap of the kinds of scries we want to watch out for:
1 if we want to check against people being scried directly
2 if we want to check against rooms being scried
4 if we want to check against people being scried as a result of someone else
being scried
8 if the scry is a continuous thing.  Should be just in conjunction with
something of the above
ob - The person to check for scrying
thing - The object (or filename of object) to call back to
func - The function to call
data - Any other data we might want
- Returns:
An int which can be used to identify the callback in order to remove
it
  
- 
remove_scry_callback
int remove_scry_callback(int id)
 
This removes a scry callback.
- Parameters:
id - The id of the callback to remove, as returned by
register_for_scries()
- Returns:
1 for success, 0 for failure