All pastes #339913 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-04 12:01 UTC
rendered paste body
on *:TEXT:!vote*:#: {
  if ($2 == $null) { .notice $nick you must specify a length }
  else {
    if ($nick !isreg $chan) {
      set %vote $3-
      /timer1 1 $calc($2*60) /unset %vote
      .msg $chan Poll started. Will remain active for $2 minutes
    }
  }
}

on *:TEXT:!yes:#: {
  if ($nick !isreg $chan) {
    if (%yes) {
      /inc %yes 1
      else {
        set %yes 1
      }
    }
  }
}

on *:TEXT:!no:#: {
  if ($nick !isreg $chan) {
    if (%no) {
      /inc %no 1
      else {
        set %no 1
      }
    }
  }
}

on *:TEXT:!poll:#: {
  if ($nick !isreg $chan) {
    if (%vote) {
      .notice $nick current poll: %vote
      else {
        .notice $nick There are no polls set. Type !vote Time Questions to start one.
      }
    }
  }
}