Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
dime
Novice


Joined: 15 Dec 2002
Posts: 35

PostPosted: Sat Apr 05, 2003 1:38 am   

on disconnect
 
is there a way to use connection status as a trigger or a condition?

for example, when i'm disconnected, it does a #say %time

and as a condition, an alias that checks whether or not zmud is connected, if it is, send login, if not, send #connect;login, etc etc...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Apr 05, 2003 4:36 am   
 
zMUD has builtin aliases atconnect and atdisconnect. If you use those as alias names, the actions will take place when the appropriate event occurs.
#AL atdisconnect {#SAY %time}

I don't know of any reliable way to check the connection status.

LightBulb
Advanced Member
Reply with quote
Wrudyn
Novice


Joined: 24 Mar 2003
Posts: 44
Location: USA

PostPosted: Sat Apr 05, 2003 4:57 am   
 
You could make a variable that is set to true when atconnect is called, and set to false when atdisconnect is called. That way you can check the variable to see if you are connected.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Apr 05, 2003 2:19 pm   
 
The predefined variable %ctime is the best way to check connection status. The atdisconnect alias is executed after a failed connection attampt as well as when disconnected from your mud. If you use this alias make sure you take this into account.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net