rendered paste bodyon $*:TEXT:/^[!@]poll /Si:#: {
if ($me != iScape) && (iscape ison $chan) { halt }
if ($chan == #roly) {
if (%poll.on. [ $+ [ $chan ] ] == on) { msg $chan Already A Poll Running. | halt }
msg $chan New Poll Started By $nick $+ ! The Question Is $3- $iif($2 isnum,It Will Last For $2 Miutes,It Will Last For 5 Minutes)
msg $chan Vote by typing !yes or !no
set %poll.on. [ $+ [ $chan ] ] on
set %poll.time. [ $+ [ $chan ] ] $iif($2 isnum,$calc($2 * 60),300)
timer 1 $calc(%poll.time. [ $+ [ $chan ] ] - 5) msg $chan Poll Has Ended Results Are Yes = %yes. [ $+ [ $chan ] ] and No = %no. [ $+ [ $chan ] ] | timer 1 %poll.time. [ $+ [ $chan ] ] unset %poll.on. [ $+ [ $chan ] ] | timer 1 %poll.time. [ $+ [ $chan ] ] unset %yes. [ $+ [ $chan ] ] | timer 1 %poll.time. [ $+ [ $chan ] ] unset %no. [ $+ [ $chan ] ] | timer 1 %poll.time. [ $+ [ $chan ] ] unset %poll.time. [ $+ [ $chan ] ]
}
}
on $*:TEXT:/^[!@](yes|no)/Si:#: {
if ($me != iScape) && (iscape ison $chan) { halt }
if (%poll.on. [ $+ [ $chan ] ] == on) {
if ($nick != %voted. [ $+ [ $nick ] ]) { notice $nick You Can Only Vote Once! | halt }
if (*yes* iswm $1) && (%poll.on. [ $+ [ $chan ] ] == on) { inc %yes. [ $+ [ $chan ] ] | notice $nick You Have Voted Yes | set %voted. [ $+ [ $nick ] ] $nick }
elseif (*no* iswm $1) && (%poll.on. [ $+ [ $chan ] ] == on) { inc %no. [ $+ [ $chan ] ] | notice $nick You Have Voted No | set %voted. [ $+ [ $nick ] ] $nick }
}
}