[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Script to send a "quit" to mud avoiding auto-reconnect

Script to send a "quit" to mud avoiding auto-reconnect

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Welcomb   (14 posts)  [Biography] bio
Date Thu 03 Jul 2003 05:17 PM (UTC)
Message
I want to alias a script that will execute a few commands before quiting the MUD. What I did was use World.send "quit" to initiate a quit on the server.

However, the auto-reconnect will think it's a server disconnect and auto reconnect for me. I tried putting World.disconnect after sending "quit" but it disconnects too quickly for me to see the final few text (which are sometimes important) from the server. Or in cases where I'm not allowed to quit, World.disconnect will disconnect me all the same.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Fri 04 Jul 2003 12:28 AM (UTC)
Message
The "quit" command should disable auto-reconnect. However in a doing a world.send "quit" bypasses that.

There is a simple, simple solution. :)

Instead of:

world.send "quit"

Do:

world.execute "quit"


What this does is simulate typing "quit" and thus the auto-reconnect stops it reconnecting. I am assuming that your alias is not itself called "quit" or you will get a loop.

However if this is the case, you can work around this in various ways. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,511 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]