rendered paste bodyon *:text:!polloff:#:{
if ($nick !isop $chan) {
notice $nick 12You must be an 4Operator 12to use this command!
halt
}
else {
if (%poll.cc. [ $+ [ $chan ] ] == off || %poll.cc. [ $+ [ $chan ] ] == $null) {
notice $nick 12Poll is already 4off12 in4 $chan $+ 12! To turn it 4on12 type "4!pollon12".
}
else {
set %poll.cc. [ $+ [ $chan ] ] off
notice $nick 12Poll is now4 disabled12 in4 $chan $+ 12.
} } }
on *:text:!pollon:#:{
if ($nick !isop $chan) {
notice $nick 12You must be an 4Operator 12to use this command!
halt
}
else {
if (%poll.cc. [ $+ [ $chan ] ] == on) {
notice $nick 12Poll is already 4on12 in4 $chan $+ 12! To turn it 4off12 type "4!polloff12".
}
else {
set %poll.cc. [ $+ [ $chan ] ] on
notice $nick 12Poll is now4 enabled12 in4 $chan $+ 12.
} } }
on *:text:!polldis:#:{
notice $nick 1| Turning Polls On/Off |
notice $nick 4Poll On
notice $nick 12Automatically the first time, poll will be set off. Type !pollon to turn it on. (Must be Operator)
notice $nick 4Poll Off
notice $nick 12Automatically the first time, poll will be already set to off. Type !polloff to turn it off. (Must be Operator)
notice $nick 1 -- End -- }
on *:text:!polli:#:{
notice $nick 1| Poll Info |
notice $nick 12"!poll Minutes Question" - Starts a poll, Minutes 1-5
notice $nick 12"!yes" or "!no" - Votes in a poll
notice $nick 12"!polldis" - Learn how to disable/enable poll working in $chan $+
notice $nick 1 -- End --
}
on *:text:!poll *:#:{
if (%poll.status. [ $+ [ $chan ] ] == on) {
notice $nick 12Error 4Poll 1-12 Poll is already running in $chan $+ !
halt
}
else {
if (%poll.cc. [ $+ [ $chan ] ] = off || %poll.cc. [ $+ [ $chan ] ] == $null) {
notice $nick 12Error 4Poll 1-12 Poll is disabled in $chan $+ ! To turn it 4on12, have an 4operator12 type "4!pollon12".
halt
}
else {
if ($3 == $null) {
notice $nick 12Error 4Poll 1-12 Syntax: "!poll Minutes Question" Minutes can be 1-5
halt
}
else {
if ($2 > 5 || $2 < 1) {
notice $nick 12Error 4Poll 1-12 The Minutes must be 1-5 minutes in syntax
halt
}
else {
set %poll.status. [ $+ [ $chan ] ] on
set %poll.chan. [ $+ [ $chan ] ] $chan
set %poll.ques. [ $+ [ $chan ] ] $3-
set %poll.time. [ $+ [ $chan ] ] $2
msg $chan 1|Poll| - 12Nick:4 $nick -12 Question:4 %poll.ques. [ $+ [ $chan ] ] 1-12 Vote:4 !yes 1& 4!no 1-12 Info:4 !polli 1- 12Time:4 %poll.time. [ $+ [ $chan ] ] Minute(s) 1-
timer 1 $calc( ( $2 * 60 ) - 1 ) set %poll.cchan $chan
timer 1 $calc( $2 * 60 ) aliaspollt
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.status. [ $+ [ $chan ] ]
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.chan. [ $+ [ $chan ] ] $chan
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.ques. [ $+ [ $chan ] ]
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.time. [ $+ [ $chan ] ]
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.sn. [ $+ [ $chan ] ] $+ *
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.tehpoll.no [ $+ [ $chan ] ] $+ *
timer 1 $calc( ( $2 * 60 ) + 1 ) unset %poll.tehpoll.yes [ $+ [ $chan ] ] $+ *
} } } } }
alias aliaspollt {
if (%poll.tehpoll.no [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 1|Poll| 1- 4Poll Over 1-12 Time:4 %poll.time. [ $+ [ %poll.cchan ] ] Minute(s) 1- 12Question:4 %poll.ques. [ $+ [ %poll.cchan ] ] 1- 12Outcome: 7Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 1& 7No:4 No Votes 1-
unset %poll.cchan
}
else {
if (%poll.tehpoll.yes [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 1|Poll| 1- 4Poll Over 1-12 Time:4 %poll.time. [ $+ [ %poll.cchan ] ] Minute(s) 1- 12Question:4 %poll.ques. [ $+ [ %poll.cchan ] ] 1- 12Outcome: 7Yes:4 No Votes 1& 7No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] 1-
unset %poll.cchan
}
else {
if (%poll.tehpoll.yes [ $+ [ %poll.cchan ] ] == $null && %poll.tehpoll.no [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 1|Poll| 1- 4Poll Over 1-12 Time:4 %poll.time. [ $+ [ %poll.cchan ] ] Minute(s) 1- 12Question:4 %poll.ques. [ $+ [ %poll.cchan ] ] 1- 12Outcome: 7Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 1& 7No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] 1-
unset %poll.cchan
}
else {
msg %poll.cchan 1|Poll| 1- 4Poll Over 1-12 Time:4 %poll.time. [ $+ [ %poll.cchan ] ] Minute(s) 1- 12Question:4 %poll.ques. [ $+ [ %poll.cchan ] ] 1- 12Outcome: 7Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 4& 7No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] 1-
unset %poll.cchan
} } } }
on *:text:!yes:#:{
if (%poll.status. [ $+ [ $chan ] ] == off || %poll.status. [ $+ [ $chan ] ] == $null) {
notice $nick 12Error 4Poll 1-12 Poll is not on.
halt
}
else {
if (%poll.cc. [ $+ [ $chan ] ] == off || %poll.cc. [ $+ [ $chan ] ] == $null) {
notice $nick 12Error 4Poll 1-12 Poll is disabled in $chan $+ .
halt
}
else {
if (%poll.sn. [ $+ [ $chan ] ] [ $+ [ $nick ] ] == on) {
notice $nick 12Error 4Poll 1-12 You have already voted in this poll in $chan $+ !
halt
}
else {
set %poll.sn. [ $+ [ $chan ] ] [ $+ [ $nick ] ] on
inc %poll.tehpoll.yes [ $+ [ $chan ] ] 1
notice $nick 12You have successfully voted 4yes12 for the poll in4 $chan $+ 12.
} } } }
on *:text:!no:#:{
if (%poll.status. [ $+ [ $chan ] ] == off || %poll.status. [ $+ [ $chan ] ] == $null) {
notice $nick 12Error 4Poll 1-12 Poll is not on.
halt
}
else {
if (%poll.cc. [ $+ [ $chan ] ] == off || %poll.cc. [ $+ [ $chan ] ] == $null) {
notice $nick 12Error 4Poll 1-12 Poll is disabled in $chan $+ .
halt
}
else {
if (%poll.sn. [ $+ [ $chan ] ] [ $+ [ $nick ] ] == on) {
notice $nick 12Error 4Poll 1-12 You have already voted in this poll in $chan $+ !
halt
}
else {
set %poll.sn. [ $+ [ $chan ] ] [ $+ [ $nick ] ] on
inc %poll.tehpoll.no [ $+ [ $chan ] ] 1
notice $nick 12You have successfully voted 4no12 for the poll in4 $chan $+ 12.
} } } }