[Encore] [enCore] Recommended Cleanup

Kevin Jepson kevijeps at telusplanet.net
Fri Jul 6 18:24:25 MDT 2007


Hi Jean-Marc
You can check how long a player has been idle and then "boot" them, which is
a forced disconnect, or move them etc.
Each player has a property called idle_seconds that records how long they
have been idle.
Alexandre Borgia wrote a short verb for doing this which he posted to the
Encore List.
Here is his post, maybe this code could be adapted.
Ciao
KJ

Reply to a query about getting rid of sleeping players:

The manual way of disconnecting players is the "@boot <player>" command - or

is it what you meant by "blowing them away"?

If this is a frequent behavior, you might want a simple automated task, for 
example:

@verb me:@auto-b*oot none none none rdx
@program me:@auto-boot
for i in (connected_players())
if (idle_seconds(i) >= 7200)
i:tell("It's time to go to bed!");
boot_player(i);
endif
endfor
fork (3600)
this:("@auto-boot")();
endfork
.

This code will boot players who have been inactive for more than two hours 
(or 7200 seconds - you can change this value to your own needs). Actually, 
they will be booted when idling for somewhere between 2 and 3 hours, since 
the code gets executed every hour (or 3600 seconds - you can, again, change 
this value).

I'm not sure what you mean about "not blowing them away", but this kind of 
"kicking" has no negative effects (as banning the player from the MOO, etc.)

- it simply disconnects the user.

- Alexandre Borgia
  
-----Original Message-----
From: encore-bounces at encore-consortium.org
[mailto:encore-bounces at encore-consortium.org] On Behalf Of Jean-Marc Giffin
Sent: July 6, 2007 7:20 AM
To: encore at encore-consortium.org
Subject: [Encore] [enCore] Recommended Cleanup


Hey All!

Would anyone care to explain briefly how the $housekeeper works? Does it
automatically take sleeping players to their home after a certain period of
time, and if so, which verb is running to allow it to check up on player's
statuses?

My main reason for interest in asking is that I would like to make it so
that there is a way to check if a player is idle (as in, inactive) for 7
minutes. If they are, they are moved to a room that I specify (not their
home room). I was wondering if I should start from scratch, or if the
$housekeeper already provides some features like this that I should take
advantage of.

Thanks!

Jean Of mArc 


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.0/886 - Release Date: 04/07/2007
1:40 PM

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.1/888 - Release Date: 06/07/2007
6:36 AM
 




More information about the Encore mailing list