if (!vote == $1) {
if (($2 == $null) || ($2 != add) && ($2 != Stats) && ($2 != Disable) && ($2 != yes) && ($2 != no)) { HALT }
if ($userread($nick,ident) != Yes) { .notice $Nick You need to identify, before using this command. | HALT }
if (($2 == Yes) && (%vote.s == On)) { inc %Vote.Y | .notice $nick Thank You for your input! | HALT }
if (($2 == No) && (%vote.s == On)) { inc %Vote.N | .notice $nick Thank You for your input! | HALT }
if (($2 == Stats) && (%Vote.q != $null)) { msg $botread(bot_stuff,chan) Current Poll( $+ %Vote.Q $+ ) - Yes( $+ %Vote.Y $+ ) - No( $+ %Vote.N $+ ) - Total( $+ $calc(%Vote.Y + %Vote.N) $+ ) | HALT }
if ($2 == Disable) {
if (($userread($nick,level) != Manager) || ($userread($nick,level) != Master)) { .notice $nick Only Master(s) or Manager(s) may use this command. | HALT }
else { set %Vote.s Off | .notice $nick Done! Voting polls are now closed. | HALT }
}
if ($2 == ADD) {
if (($userread($nick,level) != Manager) || ($userread($nick,level) != Master)) { .notice $nick Only Master(s) or Manager(s) may use this command. | HALT }
if ($3 == $null) { .notice $nick Syntax: !Vote add <Question> | HALT }
else {
set %Vote.s On
set %Vote.Q $3-
set %Vote.Y 0
set %Vote.N 0
.notice $nick Done! New poll has been started.
}
}
}