Chris, Sameer, what about those situations where we pass a whole set of parameters packed in an array? Some of those parameters could be changed, while others should remain read-only. How would we pass this information to the plugin? I think we should leave the interface as it is, and trust the plugin authors do not tamper the parameters they shouldn't be messing with. (Should a plugin author break the rules we could always ask GregBot to 'lart' him publicly.) -m On 1/5/06, Sameer D'Costa <sameerslists at gmail.com> wrote: > Chris, > > I think there would be a problem with plugins hooks that *require* the > data passed from one plugin to the other. For example if you have > multiple plugins that hook onto rss.plugins.import.description then it is > important that the data returned by a plugin be passed onto the next > plugin that hooks onto this same hook. There are some others. > > Maybe we could have an additional parameter in function rss_plugin_hook > which determines when we want a read-only parameter and when we want the > parameter to be passed through by default. > > Best, > Sameer > > On Thu, Jan 05, 2006 at 11:04:31AM -0500, Chris J. Friesen wrote: > > > Date: Thu, 5 Jan 2006 11:04:31 -0500 (EST) > > From: "Chris J. Friesen" <Darth_Sebulba05 at phreaker.net> > > To: gregarius-dev at sinless.org > > Subject: [greg-dev] ReadOnly Plugin Hook Params > > Reply-To: Darth_Sebulba05 at phreaker.net, gregarius-dev at sinless.org > > > > Hey, > > > > I was just having a discussion about the parameters passed into a plugin > > hook and how the next plugin using that hook gets it's value. > > > > In certain cases, I would think that a plugin should not be able to > > change the value it is given, even if it does have to return it. > > > > An example of this is, *item.beforetitle . If a plugin changed the id > > passed into that, all plugins afterwords would start acting weird or not > > work at all. > > > > What was proposed is some way of making certain plugin hook parameters > > ReadOnly (the hook code replaces the return value of the hooked function > > with the original value). It prevents the above situation and ensures > > that all plugins get the proper data. > > > > This naturally would have no effect on the hooks where changing the data > > is necessary, only the ones that need to return the data they are given > > for the plugin flow to work. > > > > Does anyone see a potential problem with this? > > > > Later, > > Chris > > -- > > Website: http://darthsebulba.is-a-geek.org/ > > Public Key: > > http://darthsebulba.is-a-geek.org/Key/Darth_Sebulba05-at-phreaker-net_pub.key > > > > _______________________________________________ > > gregarius-dev mailing list > > gregarius-dev at sinless.org > > http://sinless.org/mailman/listinfo/gregarius-dev > _______________________________________________ > gregarius-dev mailing list > gregarius-dev at sinless.org > http://sinless.org/mailman/listinfo/gregarius-dev >