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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Aliases - They should keep evaluating through all plugins.

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Aliases - They should keep evaluating through all plugins.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Tue 14 Jan 2003 01:38 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Avariel   Portugal  (55 posts)  [Biography] bio
Date Reply #1 on Tue 14 Jan 2003 07:59 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 14 Jan 2003 10:07 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #3 on Tue 14 Jan 2003 10:39 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 15 Jan 2003 03:32 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sat 05 Apr 2003 09:39 PM (UTC)  quote  ]
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
[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.


2,108 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]