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
➜ Why are plugins global?
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| ERogue
(2 posts) Bio
|
| Date
| Mon 22 Feb 2016 03:51 AM (UTC) |
| Message
| Greetings. After a week or of using MUSHClient 5.01, I've made good progress learning, imo, but I still have a few basic issues (I think I'll only post one at a time, tho). Please accept my apologies if I've failed at searching. And upfront allow me to offer thanks for any support from anybody.
Firstly, I'd expect plugins to be local to a world rather than a global setting. A practical case is the AddNewLineToPrompt plugin to enable prompt triggers on servers that don't have newline in their prompt. Obviously, this is very frequently customized to each server, so having it global has little practical value as I use multiple worlds.
I can see that it could be extended to switch cases per connection (if I knew how), but regardless I'm just wondering if I'm overlooking something more direct.
Good evening. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 22 Feb 2016 04:16 AM (UTC) |
| Message
| Plugins are intended to be useful files in their own right, and therefore loaded into multiple world files (and even given to friends so they can use them as well).
However a plugin is only "applied" to a particular file if you load it (using File menu -> Plugins).
There is a provision for global plugins in the File menu -> Global Preferences, but you would only use that for plugins that you happened to want in every world.
I'm not sure if that answers your question, but perhaps it does. Are you by any chance accidentally using the Global Plugins option rather than world-by-world plugins? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Fiendish
USA (2,541 posts) Bio
Global Moderator |
| Date
| Reply #2 on Mon 22 Feb 2016 11:16 AM (UTC) Amended on Mon 22 Feb 2016 11:29 AM (UTC) by Fiendish
|
| Message
|
Quote: A practical case is the AddNewLineToPrompt plugin to enable prompt triggers on servers that don't have newline in their prompt. Obviously, this is very frequently customized to each server, so having it global has little practical value as I use multiple worlds.
The entire point of a plugin is that the code stays the same no matter what world you load it into. If this is a problem then you're customizing wrong. Plugin state is saved per world. If you have different worlds needing different effects but basically the same code, don't customize the code per world! Genericize the code to load the relevant parameters from variables so that the same code can run in any world with customized variable data. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| ERogue
(2 posts) Bio
|
| Date
| Reply #3 on Tue 23 Feb 2016 06:33 AM (UTC) Amended on Tue 23 Feb 2016 07:28 AM (UTC) by ERogue
|
| Message
|
Nick Gammon said:
However a plugin is only "applied" to a particular file if you load it (using File menu -> Plugins).
There is a provision for global plugins in the File menu -> Global Preferences.
Oh, great, indeed I only saw the option for File menu / Global Preferences, I completely overlooked File menu / Plugins!
I was in fact missing the obvious, thanks!
[Edit to add:]
Resolved.
Testing is so much quicker now that I can just reload a world pluging rather than restarting the client.
For what it's worth, I assumed non-global plugins didn't exist because there's no plugin section in the World Properties screen. Perhaps such a section could be added.
Have fun. | | 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,779 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top