Your answer suggest that 'begin' and 'end' should not have been used to return a menu item other than a separator.
The help file is not clear about what you can return with 'begin' and 'end', it is only mentioned that they are send to check if the items should be enclosed in separator.
Since the help file is not saying anything about returning something else than a separator for these two and since it has always worked this way, one can only assume it is meant to work
I have already returned something else than a separator in the past, for me the behavior is expected and this is a break in compatibility.
I wrote a script for TECO which used this behavior on purpose.
The way $submenu works is unique. One of its drawback, if i may, is that when you are done with displaying your menu, you must /return an empty value, otherwise mirc will feed you with N+1. This is in conflict with using return for creating a menu item: you can't both stop $submenu and return a menu item.
It may seems trivial but this is extremely annoying when you are done and need to return a menu item.
Because of this and because $submenu can only create one menu item at a time per return, the only workaround possible is to get into this bug report mode: you must return nothing first to stop getting N+1 and then you must return your menu item for the 'end' iteration, which is how TECO found this issue.
Last edited by Khaled; 10/11/22 07:38 PM.