Global plugins

Posted by Poromenos on Mon 22 Mar 2004 08:22 PM — 8 posts, 20,836 views.

Greece #0
How about having global plugins as well as world plugins? Global plugins would be plugins that are not specific to a world, such as hotkey, UI or whatnot plugins. any triggers/aliases/whatever would be applied to every world opened (or not).
Australia Forum Administrator #1
Yes, good idea. I have added that to version 3.47.
Greece #2
Hm, could there also be an option in the plugin header, such as is_global="y" that would make the plugin be loaded once for every mushclient instance instead for once every world? That would be useful for plugins that might work with an ActiveX program and would not be world-specific, such as checking for a new version or logging something to a textfile each time you started MUSHClient up. I don't know how easy it would be to disable all the world-specific functions in these though...
Greece #3
By the way, I loaded the chat plugin as a global plugin and it produced an error every time it loaded (it was loaded internally as well). Could it be that the local plugin was loaded before the global one?
Greece #4
OK, I tried another one and it worked fine. It only clashed with the Chat plugin (it was the first i ever loaded).
USA #5
Are 'global' plugins actually global? or are they just loaded into each world?
Greece #6
They're just loaded in each world you open.
Australia Forum Administrator #7
Quote:

Hm, could there also be an option in the plugin header, such as is_global="y" that would make the plugin be loaded once for every mushclient instance instead for once every world ...


Let's not get carried away. :) Just make a dummy world for such a plugin.

Quote:

Could it be that the local plugin was loaded before the global one?


Yes, I think so. I put in code to detect duplicates but it is based on the exact plugin pathname, rather than the plugin ID, as it hasn't loaded it at that point. I suggest if you get clashes remove the plugin from the world and save it.

Quote:

Are 'global' plugins actually global?


It is simply a quick way of auto-loading plugins. Other than that they function the same.