New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.8.4] matchattr is not backward compatible #815
Comments
Yep, definitely a bug, from what I can see. Yikes! |
Hi @wilkowy, looking in to this a little more, I want to walk back my last comment of 'bug'. In 1.6.21, the code you wrote would use the - as a 'not' prefix to a flag, not a 'any' flag the way they are used in bind masks (I'm assuming, perhaps incorrectly, that the bind mask format is how you thought it would work?), and didn't provide error checking if no flags were specified after the -. Now, it does. Is there a specific use case you have, where you anticipate code as you wrote out being used like this? As it was implemented in 1.6.21, I can't think of any scenario where something other than a '1' would be returned when passing - or -|-. Essentially you're not providing Eggdrop any flags to match against, this change brings it more in line and, correctly in my opinion, tells you that no flags were provided (or in the exact terms of the error message, an unknown flag). But hey, I could easily be wrong here- let me know your thoughts and we'll work through it. I think at minimum I'll add an additional phrase to tcl-commands.doc making explicit the functionality of '-' before closing out this issue. Thanks! Test examples from 1.6.21 always returning 1:
|
@wilkowy Hi! Any comments on these new docs or what I presented above, before we close it out? Thanks! |
Found by: wilkowy Patch by: Geo Fixes: #815 One-line summary: Update docs to better describe matchattr functionality Additional description (if needed): While not necessarily a bug, better docs can help explain the functionality of matchattr. Also fixed some typos in tcl-commands.doc and firstinstall while we're at it.
@vanosg Sorry, had no time to check GitHub for some time. This issue is not the problem with the docs, but with the changed handling of matchattr which causes some older scripts to break now. The "-|-" or "-" check is to see if user isn't added to userlist or is added without any global/channel flags (a handle grouping multiple hosts for a single user) - a common user without any privileges.
Eggdrop 1.8.4 triggers an error while checking for existing user, while it doesn't for not added one. Eggdrop 1.6.21 just returned "0" for both cases. Such behaviour was useful for example in triggering actions for dynamic binds which processed whole channel text:
The non-existing handle can be checked with |
1.6.21:
1.8.4:
Bug or change?
The workaround for now is to check flags for "-" & "-|-" before.
The text was updated successfully, but these errors were encountered: