All pastes #147276 Raw Edit

Mine

public text v1 · immutable
#147276 ·published 2006-08-24 08:37 UTC
rendered paste body
on *:text:!setpoll*:#RsAnagrams:{
  if (($nick isop $chan) && (%pollquestion == $null)) {
    /set %pollquestion $2-
    /msg $chan 7 A new Poll has been started. The current question is 5 $2-. 7To see the poll again, and your options for voting, type !poll
  }
  if (%pollquestion) { /notice $nick There is a poll running }  
}
on *:text:!poll:#RsAnagrams:{
  notice $nick %pollquestion
  notice $nick If you vote yes, please type !vote yes
  notice $nick If you vote no, please type !vote no
}
on *:text:!vote*:#RsAnagrams:{
  if ( %pollvote. [ $+ [ $nick ] ] == $null ) {
    If (($2 == yes) || ($2 == no)) { /set %pollvote. [ $+ [ $nick ] ] $2 }
    if ($2 == yes) { /inc %pollyes }
    if ($2 == no ) { /inc %pollno }
  }
  else /notice $nick You have already voted in this Poll
}
on *:text:!pollresult:#RsAnagrams:{
  if ($nick isop $chan) {
    msg $chan These where the results of the Poll: Yes ( %pollyes ) No ( %pollno )
    /unset %poll*
  }
}