I wasn't able to test the newnick part, but everything else works exactly as it should
Code:
on *:DICONNECT: unset $+(%,wait:,$cid,:*)

on @*:JOIN:#:{
  set $nwait($chan).noop $addtok($nwait($chan),$nick,32)
  $+(.timerWait:,$cid,:,$chan) 1 5 nWaitAdminMsg $!( $chan ,0)
}

on !*:NICK:{
  var %x = 1
  var %c
  var %n = /(?<=^| )\Q $+ $replacecs($nick,\E,\E\\E\Q) $+ \E(?= |$)/
  while ($comchan($nick,%x)) {
    %c = $v1
    if ($nWait(%c)) {
      set $nwait(%c).noop $regsubex($v1,%n,$newnick)
    }
    inc %x
  }
}

on @admin:TEXT:!Next:#:{
  var %n = $nwait(#)
  while (%n) && ($gettok(%n,1,32) !isreg #) {
    %n = $gettok(%n,2-,32)
  }
  if (%n) {
    mode # +v $gettok(%n,1,32)
    set $nwait(#).noop $gettok(%n,2-,32)
  }
  else {
    unset $nwait(#).noop
    notice $nick There is no one waiting to be helped.
  }
}

alias nWaitAdminMsg {
  if (!$1) { return }
  elseif ($me !isop $1) { 
    unset $nwait($1).noop 

  }
  else {
    var %n = $nwait($1)
    var %r
    var %x = 1
    while ($gettok(%n,%x,32)) {
      if ($v1 isreg $1) {
        %r = %r $v1
      }
      inc %x
    }
    if (!%r) {
      unset $nwait($1).noop
    }
    else {
      set $nwait($1).noop %r
      var %x = 1
      var %a
      while ($ulist(*,admin,%x)) {
        var %u = $v1
        var %y = 1
        while ($ialchan(%u,$1,%y)) {
          %a = $addtok(%a,$gettok($v1,1,33),44)
          inc %y
        }
        inc %x 
      }
      if (%a) {
        msg %a The following users are waiting for help: %r
      }
    }
  }
}

alias nWait {
  if ($prop == noop) return $+(%,wait:,$cid,:,$1)
  return $($+(%,wait:,$cid,:,$1),2)
}


I am SReject
My Stuff