on *:TEXT:!poll*:#:{ if (%poll.on) { .notice $nick A poll is already running in %poll.chan | halt } if ($2 isnum 1-) { if ($2 < 6) { set %poll.time $calc( $2 * 60) } else { set %poll.time 300 } set %poll.question $3- } else { set %poll.time 300 set %poll.question $2- } set %poll.on 1 set %poll.chan $chan msg $chan 7Poll started by-4 $nick $+  msg $chan 7Question-4 %poll.question 7Time-4 $calc( %poll.time / 60 ) Minutes  .timer 1 %poll.time endpoll } alias endpoll { if (%poll.yes == $null) { set %poll.yes 0 } if (%poll.no == $null) { set %poll.no 0 } msg %poll.chan 7Poll Ended::4 Question-7 %poll.question  msg %poll.chan 7Results:4 %poll.yes 7Yes Votes4 %poll.no 7No Votes msg %poll.chan 4 $calc($round($calc( %poll.yes / ( %poll.yes + %poll.no) ),2)*100) $+ % 7Said Yes 4 $calc($round($calc( %poll.no / ( %poll.yes + %poll.no) ),2)*100) $+ % 7Said No unset %poll.* } on *:TEXT:!yes:#:{ if (%poll.on == $null) { .notice $nick No poll is running | halt } if ($chan == %poll.chan) { if (%poll. [ $+ [ $nick ] ] == $null) { if (%poll.yes == $null) { set %poll.yes 1 } else { inc %poll.yes 1 } set %poll. [ $+ [ $nick ] ] 1 .notice $nick 9,12 Thank you for your Vote } } } on *:TEXT:!no:#:{ if (%poll.on == $null) { .notice $nick No poll is running | halt } if ($chan == %poll.chan) { if (%poll. [ $+ [ $nick ] ] == $null) { if (%poll.no == $null) { set %poll.no 1 } else { inc %poll.no 1 } set %poll. [ $+ [ $nick ] ] 1 .notice $nick 9,12 Thank you for your Vote } } } on *:TEXT:!endpoll:#:{ if (%poll.on == $null) { .notice $nick No poll is running | halt } if ($chan == %poll.chan) { if ($nick isop $chan) { endpoll } } } on *:join:%poll.chan:{ if ($nick != $me) { .notice $nick 7Current Poll4 %poll.question } } on *:TEXT:!pollhelp:*:{ .notice $nick The following are commands for !poll. .notice $nick !poll