Code:
on *:TEXT:!getusers *:#: {
  if ($nick isop #warns_snug) { 
    var %chan = $2-
    var %nicks = $nick(%chan,0)
    var %no = 1
    while ( %no <= %nicks ) {
      var %nick = $nick(%chan,%no)
      msg #warns_snug %nick
      inc %no
    }
  }
}

* untested, fixed code to use local vars, and corrected possable ertror in while loop *

The nick with the script MUST be in that channel for this to work tho!