mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Stops the rest of the macro body, split the way 3.3.5 splits it: the command is addon Lua, and the flag belongs to the body runner, which is what makes "stop the rest of THIS macro" mean anything. The runner clears the flag for each body it starts and restores the previous value when that body ends, so a line that runs another macro re-enters the runner and the inner /stopmacro ends the inner body only. A stray StopMacro() outside a macro leaves nothing armed for the next one. Each line is dispatched synchronously through ChatEdit_SendText into its handler, so the flag is already set when the fire returns. The command binds ClassicAPI.StopMacro rather than the bare global. StopMacro is a plain name in a crowded space, and the global is only ours until an addon declares one of its own -- after which the command would set THEIR flag and the macro would keep running with nothing to show for it. The mirror captured our function at registration.