I guess you could use access levels for remembering users. I have never used access levels so I have no idea.

Here is some example code for commands only working on users that are voice:

Code
on *:text:!foobar:#channel:{
  if ($nick isvoice $chan) {
    msg $chan $nick is voice in $chan 
  }
}

If you want the !foobar to work for users that are voice or op you can replace "if ($nick isvoice $chan) {" with one of these:

Code
; User is voice or op.
if (($nick isvoice $chan) || ($nick isop $chan)) {

Code
; User is voice, halfop, or op.
if ($nick !isreg $chan) {


https://en.wikichip.org/wiki/mirc/operators

https://en.wikichip.org/wiki/mirc/access_levels