Page 1 of 1

Catch the status of connection

Posted: Thu Jun 13, 2019 3:25 pm
by vingi
hi all.
I'm trying to migrate from mushclient to mudlet, and i got a question here...
are there any ways/functions, even tricks to get the current connection status in mudlet just like GetConnectDuration() in mush?
i have looked up all the lua function API, but they seem not work..
i appreciate if anyone can help me...

Re: Catch the status of connection

Posted: Fri Jun 14, 2019 3:18 pm
by Vadi
You can connect to the connect event: https://wiki.mudlet.org/w/Manual:Event_ ... ctionEvent and then start a stopwatch to count how long you've been connected for :)

See https://wiki.mudlet.org/w/Manual:Event_Engine on how to use events in Mudlet.

Re: Catch the status of connection

Posted: Sat Jun 15, 2019 4:14 pm
by vingi
Thanks a lof for your help..
I make a new function for binding sysConnectionEvent and the other one bind sysDisconnectionEvent to get the status of connection..it works...
I've never noticed there are such 2 events here, thanks for telling me...and im gonna read the wiki more :)

Re: Catch the status of connection

Posted: Sat Jun 15, 2019 4:47 pm
by Vadi
Cool, enjoy!