/* test_reclaimd.c
*
* This object is an example of one that registers itself with the reclaimd.
* It will be destructed when next the reclaimd looks over the list, as
* we set the time very short (zero).
*
* NOTE:
* As the reclaimd won't accept objects from /doc/, you have to copy this
* file to your own dir and clone it from there!
*
*/
object wiz;
int start;
reset(arg)
{
int res;
if (!_isclone(this_object())) return;
if (!arg)
{
wiz = this_player();
start = time();
res = "obj/daemon/reclaimd" -> register(this_object(), 0, 2);
if (objectp(wiz))
if (res)
tell_object(wiz, "Registered successfully!\n");
else
tell_object(wiz, "Registered failed!\n");
}
} // reset
_exit()
{
/* DO NOT MAKE BUGS IN _exit() !!!
* That is why you see that catch() on __exit() below.
*/
catch(__exit());
} // _exit
__exit()
{
if (objectp(wiz))
tell_object(wiz,
"MESSAGE: Your clone of test_reclaimd was reclaimed at "+
ctime(time()) + "!\n");
} // __exit
Help topics available:
| test_reclaimd.c | test_timed.c |
You are guest number 140 since February 2020.
This file was last modified: June 2000.