on *:TEXT:!vote*:#iJesus:{ if ($nick isop $chan) || ($nick ishop $chan) || ($address($nick,2) == *!*@Owns.You.For.Real) && $2 isnum { set %thevote [ $+ [ $chan ] ] $($+(4,$3-)) set %votetime [ $+ [ $chan ] ] $2 msg $chan Please vote !yes or !no to the set vote: $3- ~ this will last for $duration($calc($2 * 60)) timervote 1 $calc( %votetime [ $+ [ $chan ] ] * 60 ) /voting.end $chan } } on *:TEXT:!yes*:#iJesus:{ if (%thevote [ $+ [ $chan ] ] == $null) { HALT } if (%thevote [ $+ [ $chan ] ] != $null) && ($readini(vote.ini,vote,$nick) == $chan) { notice $nick You already voted -.- | halt } else { inc %yescount [ $+ [ $chan ] ] writeini vote.ini vote $nick $chan notice $nick Your vote has been added msg $chan %thevote [ $+ [ $chan ] ] ~ yes: %yescount [ $+ [ $chan ] ] ~ no: %nocount [ $+ [ $chan ] ] } } on *:TEXT:!no*:#iJesus:{ if (!%thevote [ $+ [ $chan ] ]) { HALT } if (%thevote [ $+ [ $chan ] ]) && ($readini(vote.ini,vote,$nick) == $chan) { notice $nick You already voted -.- | halt } else { inc %nocount [ $+ [ $chan ] ] writeini vote.ini vote $nick $chan notice $nick Your vote has been added msg $chan %thevote [ $+ [ $chan ] ] ~ yes: %yescount [ $+ [ $chan ] ] ~ no: %nocount [ $+ [ $chan ] ] } } alias /voting.end { msg $1 The vote has ended ~ %thevote [ $+ [ $1 ] ] msg $1 The results ~ Yes: %yescount [ $+ [ $1 ] ] ~ No: %nocount [ $+ [ $1 ] ] unset %thevote [ $+ [ $1 ] ] unset %votetime [ $+ [ $1 ] ] unset %yescount [ $+ [ $1 ] ] unset %nocount [ $+ [ $1 ] ] remini vote.ini vote }