Used this and seems to work

Click to reveal..

Code:
on *:TEXT:!raffle:#: {
  if ((%floodraffle) || ($($+(%,floodraffle.,$nick),2))) { return }
  if (%open == 1) {
    write Raffle.txt $nick
    msg $chan $nick entered the raffle!
    set -u3600 %floodraffle On
    set -u3600 %floodraffle. $+ $nick On
  }
}

on *:TEXT:*:#:{
  if ($nick isop #) {
    if ($1 == !raffle) {
      if ($2 == open) {
        msg $chan /me RAFFLE STARTED!
        set %open 1
        write -c Raffle.txt
        echo -a Raffle Started
      }
      if ($2 == close) {
        msg $chan /me RAFFLE CLOSED!
        set %open 0
        write -c Raffle.txt
        echo -a Raffle Closed
      }
    }
    if ($1 == !draw) {
      if (%open == 1) {
        var %user = $read(Raffle.txt,n)
        write -c Raffle.txt
        set %open 0
        msg $chan /me And the winner is... %user $+ !!! Well Done!
        echo -a Raffle Closed
      }
    }
  }
  if ($1 == !people) {
    if (%open == 1) {
      msg $chan There are currently $lines(Raffle.txt) users in the raffle!
    }
  }
}