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
➜ Plugins
➜ Aliases - They should keep evaluating through all plugins.
Aliases - They should keep evaluating through all plugins.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Tue 14 Jan 2003 01:38 PM (UTC) |
Message
| Ok, I did some testing this morning and found, to my dismay, that aliases do not keep evaluating through each plugin. Here's what I was trying to do:
All plugins written by me display a header when they are installed/connected. I decided that I wanted to make a single alias "Plugins", which would be processed by each plugin, which would then act by displaying it's header.
Surprisingly, only one plugin would process the alias.
I feel this is contrary to what a plugin should do. It seemed as though the mandate of a plugin (when we were all discussing it) would be that it is independant (in most respects) to the main world, and other plugins. Alias collision is contrary to that mandate.
In my opinion, each plugin, as well as the main world, should have a go at the inputted text, running it through their respective alias-processing routines. In my case, ALL of my plugins would match the string as an alias, and they would ALL, in turn, run their respective actions.
(I confirmed my assessment by removing and reinstalling plugins).
I know there is probably a work around for this, by doing that pre-processing thingy, whatever it is. I forget, and I don't remember what to search for. |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| Avariel
Portugal (55 posts) Bio
|
Date
| Reply #1 on Tue 14 Jan 2003 07:59 PM (UTC) |
Message
| I have duplicated triggers in 3 plugins and all fire with the same output line... I agree it should be possible to happen with aliases too.. |
The Avariel Wind Lord | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #2 on Tue 14 Jan 2003 10:07 PM (UTC) |
Message
| You want OnPluginCommand - see Plugin callbacks.
I suppose it is not consistent with triggers, but I thought you would only want one action to a typed command not dozens. Using OnPluginCommand you can simulate that. OnPluginCommand is executed in each plugin, so you should be able to use that to achieve the affect you are after.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #3 on Tue 14 Jan 2003 10:39 PM (UTC) |
Message
| Well, I'll try that workaround for the short term, but as I allude to in my original post, I don't think the current methodology is favourable.
The reason behind that statement is that alias collision causes one or more plugins to malfunction. Multiple processing by each plugin and the main world is preferable.
The only exception should be, that if any plugin matched the input as an alias, then it should not be sent as regular text to the mud. IE: If I type "help" and three plugins match the text for aliases, the main world file would not send "help" to the mud.
Should you refuse to make this change, and should I want to ensure that my plugins always work, I would have to use OnPluginCommand in every Plugin, then process every single line through my own alias matching routine. What a nightmare.
(Oh so dramatic!) - LOL. |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #4 on Wed 15 Jan 2003 03:32 AM (UTC) |
Message
| I'm not refusing anything right now. I'm on holiday and don't have my Windows compiler with me. :) So it is "can't", not "won't". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 05 Apr 2003 09:39 PM (UTC) |
Message
| This problem is fixed in version 3.35 - command and alias evaluation has been rewritten, and now each plugin can take a shot at evaluating what you type, including if another plugin has matched.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
21,814 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top