I found something old but maybe you can use it:
Polling options
.Conduct a poll in $chan:{
if (%pollchan != $null) {
/set %uatext Sorry, there is allready a poll in progress on %pollchan $+ !
/set %uaatext It expires in $timer(endpoll).secs seconds - please try again then.
/useralert
/halt
}
/write votecheck.txt Checker file
/set %pollchan $chan
/set %polltitle $?="Enter poll title"
if (%polltitle == $null) { /unset %pollchan | /halt }
:getnumoptions
/set %numoptions $?="Enter number of options"
if (%numoptions == $null) { /unset %pollchan | /halt }
if ((%numoptions < 1) || (%numoptions !isnum)) goto getnumoptions
/var %counter 1
:getoptions
if (%counter < %numoptions + 1) {
/var %option $?="Enter option %counter $+ "
if (%option == $null) { /unset %pollchan | /halt }
/write voteoptions.txt 0 %option
/inc %counter
goto getoptions
}
:getlimit
/set %timelimit $?="Enter voting time limit in seconds"
if (%timelimit == $null) { /unset %pollchan | /halt }
if ((%timelimit < 1) || (%timelimit !isnum)) goto getlimit
/poll
}
.Abort current poll:{
if (%pollchan == $null) {
/set %uatext There is no poll in progress at the moment.
/useralert
/halt
}
else {
/set %timeleft $timer(endpoll).secs
/set %aborted 1
.timerendpoll off
/endpoll
}
}