Just use a loop over $sock(srbnc.auth.*). All you have is an extra step of adding "if ($regex(...))" to your loop body, which isn't a big deal.
Here's what your suggestion would look like:
; fictional regex syntax
var %i = 1
while ($sock(^srbnc.auth.(bad|word|here),%i,r)) {
var %sock = $v1
do_something_with_sock %sock
inc %i
}
Here's what it looks like now:
; valid syntax
var %i = 1
while ($sock(srbnc.auth.*,%i)) {
var %sock = $v1, %name = $gettok($v1,3,46)
if ($regex(%name,/^(bad|word|here)$/)) do_something_with_sock %sock
inc %i
}
Hardly a difference. Why is builtin support necessary again?
Windows allows a maximum number of a few hundred open sockets at a time, so looping over the extra sockets isn't a perf issue. Adding this kind of support to /sock* commands would be equally unnecessary, as you should really not be sending data to arbitrary sockets by an arbitrary name match. Rather, *if* you do, you're hitting a weird edge case and you should be able to deal with the few extra lines of code.
Of course, why you need to search your list of sockets for bad words *after* the sockets have opened is beyond me. If you want to find all the sockets that match banned usernames do so before you /sockopen (or ON SOCKOPEN) and match the socket name individually.
I still see no real benefit to regular expressions here, just extra implementation complexity. Allowing regular expression matches in $sock and /sock would require mIRC to add special switches to differentiate regular expressions from wildcard matches which would add to complexity, confusion and would ultimately be underused. Again, regular expressions are for "searching". If you need to "search" your sockets, you're doing *something* wrong.
And of course, you can always add your own aliases to do the above for $sock and all /sock commands.