The same parameter/if statement you use to search for the word 'all', you also add an 'OR' compare the string "*"
I've not looked at your code, but, shouldn't be that difficult.
If you really wanted to spend the time and polish it, you could also have it use the same checks as the group comparison,
Like, ulx restrict *,!<sent_name> sent <group> .. that of course would take more time. Quick addition should be the * and 'all' check.