Ulysses Stuff > Suggestions
Temporary user group change
Megiddo:
What Stickly said, I don't see any problem with "hijacking" a function like that. I do it with some of the default gmod functions in fact. As long as you're still calling the original function, it's pretty much like a very specific hook. It's just not something I recommend in general since very few people can even get return values from hooks right...
Megiddo:
After reviewing the source, I remember why I didn't have UCLCHANGED pass in more information. Each place I call it (about ten locations) would be using a slightly different format for the hook parameters. I'd be implementing a function-level hook, so it's way easier for both me and other devs to hook into the function as discussed above.
They're designed to be easy to hook into! All functions throw errors on invalid calls, so you don't need to worry about picking up on a false positive. The exception to this is userallow and groupallow which will return a boolean stating whether or not anything actually changed.
EDIT: Basically, the ucl changed hook was only meant as a high level, "Hey! Access has changed! You should refresh your cache!", so that you don't have to hook into these ten different functions.
Navigation
[0] Message Index
[*] Previous page
Go to full version