Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Script, auto-reconnect
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Sun 08 Aug 2004 08:50 PM (UTC) |
Message
| I want to make a script that will attempt a connection when the connection to a world is lost, every 1 minute for example. If it fails to connect, it won't open a "Failed connection" window, but instead, it will send text to the closed world saying the time, and what error it had.
I don't know any of the script commands to do this, could someone help me do this? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Sun 08 Aug 2004 11:06 PM (UTC) |
Message
| There is a "Reconnector" plugin (check your plugin folder). You need to turn off the "failed to connect" notifications (those are the popup things on connection lost and such). You turn them off in global preferences, under the general tag. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Sun 08 Aug 2004 11:56 PM (UTC) Amended on Mon 09 Aug 2004 12:17 AM (UTC) by Zeno
|
Message
| I don't see it in the plugin directory. Also, I don't want to turn off notify disconnect windows totally, only when the world is trying to re-connect, and is currently not connected.
[EDIT] I got the plugin from the site. Let me try it out.
Eh, it reconnects when I type 'quit' and it also doesn't send text to the world when the connection fails. Anyway to change this?
Its suppose to check for quitting, but it doesn't work.
quit
Your vision begins to blur, as a vortex of colors expands before your eyes
and envelops your body... When you come to, things are not as they were.
A demonic voice rasps, 'You shall be back here soon enough, Zeno...'
Connection checker enabled
--- Disconnected on Sunday, August 08, 2004, 8:01 PM ---
--- Connected for 1 minute, 21 seconds ---
Connecting to world, attempt # 1
--- Connected on Sunday, August 08, 2004, 8:01 PM ---
Ah, its case sensitive. I have to use "QUIT". Anyway to make it both quit and QUIT? An alias for quit->QUIT doesn't work.
Also, when I disconnect; (Ctrl+Shift+K) it reconnects me. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 09 Aug 2004 12:59 AM (UTC) |
Message
| Have a look inside the plugin:
2. Change the entity above "quit_command" to be the command you type to quit (eg. quit, QUIT, @quit or whatever)
That should be pretty self-explanatory.
About the 4th line of the plugin reads:
<!ENTITY quit_command "QUIT" >
Just change that.
As for the reconnect when you disconnect it, well that is what it is supposed to do. Fix the line above and you should be right. Then you see something like this in your output window:
> QUIT
Deliberate quit (QUIT), reconnect disabled
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #4 on Mon 09 Aug 2004 04:36 AM (UTC) |
Message
| Yeah, I already modified the plugin to what I wanted, except that I don't know how to define quit_command as two things, quit and QUIT.
Also, is there a script function that disables "Notify is unable to connect"? Or a function that sends the notification to the world, instead of a window? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Mon 09 Aug 2004 05:55 AM (UTC) |
Message
| Since you're not distributing the plugin, you can go in and change the match text of the alias itself, to match QUIT|quit (which, if you edited the alias to make it a regexp, you could then put in your entity). OR you can just change it to ignore case, then quit, Quit, QUIT, or any combination will work.
As for the connect thing, It would make sense if World.Connect could return the errors. Except, then you'd have your script (and client) hang until it resolved. Perhaps a callback for disconnect could include a reason why? (since the world not being able to connect still triggers the "disconnect" plugin callback) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #6 on Mon 09 Aug 2004 06:02 AM (UTC) |
Message
| Ah, didn't notice that it was an alias. Ignore case worked fine.
The reason I want to have it not open a window, is because if it fails to connect multiple times, it will have multiple windows waiting, or simply not resume past the first window, if the "Okay" button is clicked. For example, if I'm not at the computer, but I want to know why it failed. I'm going to experiment with a few functions, see what I can come up with. Any more ideas would help, thanks. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | 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.
13,205 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top