All pastes #412583 Raw Edit

Unnamed

public text v1 · immutable
#412583 ·published 2007-03-27 19:58 UTC
rendered paste body
on *:TEXT:!poll*:#: {
  if (%poll == $null) {
    msg $chan 4 $nick started a poll:12 the question was $2-
    set %poll yes
    set %question $2-
    set %nick1 $nick
    elseif (%poll != $null) { .notice $nick There is a poll already a poll set! | halt }
  }
}
on *:TEXT:!vote*:#: {
  if (%nick1 == $nick) && (%poll != $null) {
    inc %count 1
    on *:TEXT:!yes:: {
      if ($2 == yes) {
        /inc %yes 
      }
      msg $chan 12 $nick has voted 4 yes 12 on the latest poll:
      on *:TEXT:!no:#: {
        elseif ($2 == no) {
          /inc %no 
          msg $chan 12 $nick has voted 4 $2 12on the latest poll:
        }
      }
    }
  }
  on *:TEXT:!spoll*:#: {
    if (%poll != $null) && (%nick1 == $nick) {
      msg $chan the poll has been stopped the results are:
      msg $chan %yes voted for yes!
      msg $chan %no voted for no!
      /unset %poll
      /unset %nick1
      /unset %yes
      /unset %no
    }  
  }