|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: 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... |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
Wrudyn Novice
Joined: 24 Mar 2003 Posts: 44 Location: USA
|
Posted: 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.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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.
|
|
|
|
|
|