on *:TEXT:!poll*:#:{
set %yes [ $+ [ $chan ] ] 0
set %no [ $+ [ $chan ] ] 0
set %poll [ $+ [ $chan ] ] $2-
msg $chan 14[[7- Poll - 14]]12 A new poll has been started by4 $nick $+ 12!4 $2- $+ 12. Please use !yes and !no to vote. }
on *:TEXT:@poll*:#:{
if (%poll) msg $chan 14[[7- Poll - 14]]12 The current poll is:4 %poll [ $+ [ $chan ] ] $+ 12. Please use !yes and !no to vote.
else msg $chan 14[[7- Poll - 14]]12 There is no poll for $chan $+ . }
on *:TEXT:!no:#:{
inc %no [ $+ [ $chan ] ]
if (%poll) notice $nick You have voted no, thank you for voting in this poll.
else notice $nick There is no poll going on at the moment. }
on *:TEXT:!yes:#:{
inc %yes [ $+ [ $chan ] ]
if (%poll) notice $nick You have voted yes, thank you for voting in this poll.
else notice $nick There is no poll going on at the moment. }
on *:TEXT:!endpoll:#:{
if (%poll) msg $chan 14[[7- Poll - 14]]12 The poll has just ended. Results are: Yes:4 %yes [ $+ [ $chan ] ] 12and No:4 %no [ $+ [ $chan ] ]
else notice $nick There is no poll going on at the moment.
unset %yes
unset %no
unset %poll }