i gotta a little help on this i wrote the basic someone else wrote the modified version
on *:text:*:#:{
if ($strip($1) == Vote && $nick(#,$nick,oh)) {
if (!%vote.on && $2-) {
set %vote.on on
set %vote.quset $2-
msg $chan $nick Has Asked The Question: %vote.quset
msg $chan Type !yes to Vote yes Or Type !no to Vote no.
}
else { .notice $nick Sorry there is a Vote going on Now or You didnt add a question to Vote on. }
}
if ($istok(!yes !no,$strip($1),32)) {
if (%vote.on && !$($+(%,vote,.,nick,$nick),2)) {
$iif($strip($1) == !yes,inc %vote.yes 1,inc %vote.no 1)
set $+(%,vote,.,nick,$nick) yes
.notice $nick $iif($strip($1) == !yes,You Have Voted Yes.,You Have Voted No.)
}
else { .notice $nick There is either no Vote or you already have casted ur Vote. }
}
if ($strip($1) == !results && $nick(#,$nick,oh)) {
if (%vote.on) {
msg $chan The Results of the Vote Question: %vote.quset are.
msg $chan Yes: $iif(!%vote.yes,0,%vote.yes) Vote's No: $iif(!%vote.no,0,%vote.no) Vote's
}
else { .notice $nick There Is No Vote Goin on. }
}
if ($strip($1) == !clearvote && $nick(#,$nick,oh)) {
if (%vote.on) {
unset %vote.*
.notice $nick Results and vote have been cleared
}
else { .notice $nick There is no vote or results to clear }
}
}
you could make this without useing a ini file and just by useing vars maybe somthing like this to get you started.. this is one i tossed together. you have to be an op or a halfop to start a vote as well as to use the results and clear commands..
on *:text:*:#:{
if ($strip($1) == Vote && $nick(#,$nick,oh)) {
if (!%vote.on && $2-) {
set %vote.on on
set %vote.quset $2-
msg $chan $nick Has Asked The Question: %vote.quset
msg $chan Type !yes to Vote yes Or Type !no to Vote no.
}
else { .notice $nick Sorry there is a Vote going on Now or You didnt add a question to Vote on. }
}
if ($istok(!yes !no,$strip($1),32)) {
if (%vote.on && !$($+(%,vote,.,nick,$nick),2)) {
$iif($strip($1) == !yes,inc %vote.yes 1,inc %vote.no 1)
set $+(%,vote,.,nick,$nick) yes
.notice $nick $iif($strip($1) == !yes,You Have Voted Yes.,You Have Voted No.)
}
else { .notice $nick There is either no Vote or you already have casted ur Vote. }
}
if ($strip($1) == !results && $nick(#,$nick,oh)) {
if (%vote.on) {
msg $chan The Results of the Vote Question: %vote.quset are.
msg $chan Yes: $iif(!%vote.yes,0,%vote.yes) Vote\'s No: $iif(!%vote.no,0,%vote.no) Vote\'s
}
else { .notice $nick There Is No Vote Goin on. }
}
if ($strip($1) == !clearvote && $nick(#,$nick,oh)) {
if (%vote.on) {
unset %vote.*
.notice $nick Results and vote have been cleared
}
else { .notice $nick There is no vote or results to clear }
}
}
maybe make it so people can only cast 1 vote per question instead of flooding the vote, and maybe have it tell you to type !yes or !no, and have it tell you the out come of the vote and have it delete it after the voting is said and done...
as well as have it so there has to be a vote going on to use the !yes/!no command.