All pastes #587591 Raw Edit

Anonymous

public text v1 · immutable
#587591 ·published 2007-06-24 18:27 UTC
rendered paste body
on *:TEXT:!setpoll*:#: { 
  set %pollage [ $+ [ $chan ] ] $2- 
  msg $chan 4 $+ $nick 14has just set a poll type4 !yes 14or4 !no 14or4 !maybe 14to vote in this poll.
  msg $chan 14!veiwpoll to view the poll, !endpoll to end the poll and !pollresults to view the current results
  msg $chan 14The poll is4 %pollage [ $+ [ $chan ] ]
} 
on *:TEXT:!yes*:#: { 
  if ($nick == %voted [ $+ [ $nick ] $+ [ $chan ] ]) { halt }
  notice $nick 14Thanks for the Vote it has been recorded as a yes
  inc %yesvotes [ $+ [ $chan ] ] 
  inc %peoplecount [ $+ [ $chan ] ] 
  set %voted [ $+ [ $nick ] $+ [ $chan ] ] 
} 
on *:TEXT:!no*:#: { 
  if ($nick == %voted [ $+ [ $nick ] $+ [ $chan ] ]) { halt }
  notice $nick 14Thanks for the vote it has been recorded as a no 
  inc %novotes [ $+ [ $chan ] ] 
  inc %peoplecount [ $+ [ $chan ] ] 
  set %voted [ $+ [ $nick ] $+ [ $chan ] ]
} 
on *:TEXT:!maybe*:#: { 
  if ($nick == %voted [ $+ [ $nick ] $+ [ $chan ] ]) { halt } 
  notice $nick 14Thanks for the vote it has been recorded as a maybe 
  inc %maybevotes [ $+ [ $chan ] ] 
  inc %peoplecount [ $+ [ $chan ] ] 
  set %voted [ $+ [ $nick ] $+ [ $chan ] ]

} 
on *:TEXT:!viewpoll*:#: { 
  notice $nick 14The current poll is4 %pollage [ $+ [ $chan ] ] 14please vote by using4 !yes14,4 !no14, or 4!maybe 
} 
on *:TEXT:!endpoll*:#: { 
  if ($nick isop $chan || $nick ishop $chan) { 
    msg $chan 14Amount of people voted4 [ %peoplecount [ $+ [ $chan ] ] ]
    msg $chan 14Amount of votes yes4 [ %yesvotes [ $+ [ $chan ] ] ]
    msg $chan 14Amount of votes no4 [ %novotes [ $+ [ $chan ] ] ]
    msg $chan 14Amount of maybe votes4 [ %maybevotes [ $+ [ $chan ] ] ]
    unset %yesvotes  [ $+ [ $chan ] ] 
    unset %novotes [ $+ [ $chan ] ] 
    unset %maybevotes [ $+ [ $chan ] ] 
    unset %peoplecount [ $+ [ $chan ] ] 
    unset %pollage [ $+ [ $chan ] ] 
    unset %voted [ $+ [ $nick ] $+ [ $chan ] ] 
  } 
}
on *:text:!pollresults*:#: { 
  if ($nick isop $chan) {
    notice $nick 14Amount of people voted4 [ %peoplecount [ $+ [ $chan ] ] ]
    notice $nick 14Amount of votes yes4 [  %yesvotes [ $+ [ $chan ] ] ]
    notice $nick 14Amount of votes no4 [ %novotes [ $+ [ $chan ] ] ]
    notice $nick 14Amount of maybe votes4 [ %maybevotes [ $+ [ $chan ] ] ]
  }
}