rendered paste bodyon *:text:!setpoll *:#: {
set %setpoll on
amsg Global Poll started by $nick $+ . $$2- $+ ? Type !yes to answer yes and !no to answer no.
timer 1 60 amsg Global Poll Results: %pollyes Yes's and %pollno No's.
unset %pollyes
unset %pollno
unset %setpoll
}
on *:text:!yes *:#: {
if (%gpoll == on) {
if (%pollnick. [ $+ [ $nick ] ] != yes) {
set %pollnick. [ $+ [ $nick ] ] yes
inc %pollyes 1
notice $nick Thank you $nick for your vote.
[ $+ [ $nick ] ]
}
else {
notice $nick Please refrain from voting twice.
}
}
}
on *:text:!no *:#: {
if (%gpoll == on) {
set %pollnick. [ $+ [ $nick ] ] no
if (%pollnick. [ $+ [ $nick ] ] != no) {
inc %pollno 1
notice $nick Thank you $nick for you vote.
[ $+ [ $nick ] ]
}
else{
notice $nick Please refrain from voting twice..
}
}