rendered paste bodyon $*:TEXT:/^[!.]StartVote/Si:#: {
if ($nick isop $chan) {
inc %id
set $+(%,vote.question.,%id) $2-
set $+(%,vote.yes.,%id) 0
set $+(%,vote.no.,%id) 0
set $+(%,vote.starter.,%id) $nick
msg $chan ***[Vote] Question: $2- Vote id: %id $+ . To Vote message $me with !Vote ID Yes/No
}
}
on $*:TEXT:/^[!.]Vote/Si:?: {
if ($+(%,$nick.vote.,$2) == $null && $3 = YES) {
var %temp $calc($+(%,vote.yes.,$2) + 1)
set $+(%,vote.yes.,$2) %temp
set $+(%,$nick.vote.,$2) YES
msg $nick Vote counted.
}
if ($+(%,$nick.vote.,$2) == $null && $3 = NO) {
var %temp $calc($+(%,vote.no.,$2) + 1)
set $+(%,vote.no.,$2) %temp
set $+(%,$nick.vote.,$2) YES
msg $nick Vote counted.
}
}
on $*:TEXT:/^[!@]Summary/Si:#: {
var %num = $2
if ($nick == $+(%,vote.starter.,%num)) {
var %display = $iif($left($1,1) == @,msg $chan,notice $nick)
%display ***[Vote] Results for $+(%,vote.question.,%num) $+ : Yes- $+(%,vote.yes.,%num) No- $+(%,vote.no.,%num)
}
}
on $*:TEXT:/^[!.]EndVote/Si:#: {
if ($nick == $(%,vote.starter.,$nick)) {
msg $chan ***[Vote] Results for $+(%,vote.question.,$2) $+ : Yes- $+(%,vote.yes.,$2) No- $+(%,vote.no.,$2)
unset $+(%,vote.*.,$2)
unset $+(%,*.vote.,$2)
}
}
on $*:TEXT:/^[!.]Questions/Si:#: {
var %a = 0
while (%a < %id) {
inc %a
notice $nick ***[Vote] Question: $+(%,vote.question.,%a)
}
}