Try:
alias vote {
if ($active ischan) {
if ($hget(vote)) hfree vote | hmake vote 10
tokenize 35 $1-
if ($1 == on) {
if ($2 isnum) {
if ($3) {
.enable #vote
set %vote.chan $active
set %vote.t $2
set %vote.q $3-
msg $active Vote is now on $+($chr(40),$3-,$chr(41))
msg $active You have $duration($2) to answer.
msg $active PM me with !vote <Your vote>
if ($timer(vote)) {
.timervote off
}
.timervote 1 $2 voteoff
}
}
}
if ($1 == off) {
s
}
}
}
alias voteoff {
msg %vote.chan Vote is now off $+($chr(40),%vote.q,$chr(41))
if ($hget(vote,0).item > 0) {
msg %vote.chan here is the results..
var %x = $hget(vote,0).item
while (%x) {
msg %vote.chan $hget(vote,%x).item casted vote: $hget(vote,%x).data
dec %x
}
}
else { msg %vote.chan No one voted.. }
}
#vote on
On *:Text:!vote &:?: {
if (%vote.t) {
if (!$hget(vote)) hmake vote 10
if (!$hget(vote,$nick)) {
hadd vote $nick $replace($2,$chr(32),$chr(95))
msg $nick Your vote $+($chr(40),$2,$chr(41)) has been cast.
}
else { msg $nick You voted already. }
}
else { msg $nick Vote no longer on. }
}
#vote end
To start it type:
/vote on#<Time Limit>#<Question>
Example: /vote on#60#Which came first the chicken or the egg?
It will look something like:
[12:59] <Andy> Vote is now on (Which came first the chicken or the egg?)
[12:59] <Andy> You have 1min to answer.
[12:59] <Andy> PM me with !vote <Your vote>
Then private message the bot with !vote <Yes|No|Maybe|Who cares> etc..
Alternatively, click search at the top there'll be alot of vote scripts in the past expand your search to 5 years and browse scripts&popups forum.
-Andy