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 Question" - Starts a poll
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 {
set %poll.status. [ $+ [ $chan ] ] on
set %poll.chan. [ $+ [ $chan ] ] $chan
msg $chan 1|Poll| - 12Nick:4 $nick -12 Question:4 $2- 1-12 Vote:4 !yes 1& 4!no 1-12 Info:4 !polli 1- 12Time:4 2 Minutes 1-
timer 1 119 set %poll.cchan $chan
timer 1 120 aliaspollt
timer 1 121 unset %poll.status. [ $+ [ $chan ] ]
timer 1 121 unset %poll.chan. [ $+ [ $chan ] ] $chan
timer 1 121 unset %poll.sn. [ $+ [ $chan ] ] $+ *
timer 1 121 unset %poll.tehpoll.no [ $+ [ $chan ] ] $+ *
timer 1 121 unset %poll.tehpoll.yes [ $+ [ $chan ] ] $+ *
} } }
alias aliaspollt {
if (%poll.tehpoll.no [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 12The poll is now4 Over12! 1~7 Outcome 1~ 12Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 1& 12No:4 No Votes $+
unset %poll.cchan
}
else {
if (%poll.tehpoll.yes [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 12The poll is now4 Over12! 1~7 Outcome 1~ 12Yes:4 No Votes 1& 12No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] $+
unset %poll.cchan
}
else {
if (%poll.tehpoll.yes [ $+ [ %poll.cchan ] ] == $null && %poll.tehpoll.no [ $+ [ %poll.cchan ] ] == $null) {
msg %poll.cchan 12The poll is now4 Over12! 1~7 Outcome 1~ 12Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 1& 12No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] $+
unset %poll.cchan
}
else {
msg %poll.cchan 12The poll is now4 Over12! 1~7 Outcome 1~ 12Yes:4 %poll.tehpoll.yes [ $+ [ %poll.cchan ] ] 1& 12No:4 %poll.tehpoll.no [ $+ [ %poll.cchan ] ] $+
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.
} } } }