There is no such thing as a "channel owner" on twitch. The channel owner you're referring to is the person who has the same nickname as the channel. if ($nick == $mid(#,2)) { do stuff }

Code:
on *:TEXT:!raffle &:#:{
  if ($nick isop #) {
    if (($2 == on) && (%!raffle)) { 
      set %raffle $rand(1,100)
      msg $chan /me First person to guess the number between 1 and 100 wins!
    }
    elseif (($2 == off) && (%raffle)) {
      unset %raffle 
      msg $chan it's off 
    }
  }
}


Just curious, if you knew how to script this yourself, and you obviously knew how to use the unset function in the second text event, couldn't you have figured out an on/off feature yourself?