Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias resultpollcode {
- msg #tenetri {{<<< Results: Check the stream! >>>}}
- unset %voteoptions | unset %nforoptions | unset %votenicks | unset %pollison | unset %pollchannel | unset %poll.q
- unset %option1 | unset %option2 | unset %option3 | unset %option4 | unset %option5 | unset %option6 | unset %option7 | unset %option8 | unset %option9 | unset %option10
- unset %option1votes | unset %option2votes | unset %option3votes | unset %option4votes | unset %option5votes | unset %option6votes | unset %option7votes | unset %option8votes | unset %option9votes | unset %option10votes
- remove pollq.txt
- remove option1.txt | remove option3.txt | remove option2.txt | remove option4.txt | remove option5.txt | remove option6.txt | remove option7.txt | remove option8.txt | remove option9.txt | remove option10.txt
- remove option1votes.txt | remove option2votes.txt | remove option3votes.txt | remove option4votes.txt | remove option5votes.txt | remove option6votes.txt | remove option7votes.txt | remove option8votes.txt | remove option9votes.txt | remove option10votes.txt
- }
- on *:text:*:#:{
- if ($1 == !poll) {
- if ($nick isop $chan || $nick == 47y_bot || $nick == 47y_mc) {
- if (%pollison == 1) { notice $nick poll is already on }
- elseif (!$2) { .notice $nick enter something to vote for }
- else {
- set -e %pollison 1
- set -e %pollchannel #
- set %poll.q $2-
- write pollq.txt $2-
- msg # {{<<< Vote for: $2- >>>}}
- }
- }
- }
- elseif ($1 == !pollstop) {
- if ($nick == 47y_bot || $nick isop $chan || $nick == 47y_mc) {
- /resultpollcode
- }
- }
- elseif ($1 == !pollhalt && %pollison && $nick isop #) {
- msg # >>poll halted<<
- .timerpoll off
- unset %voteoptions | unset %nforoptions | unset %votenicks | unset %pollison | unset %pollchannel | unset %poll.q | remove pollq.txt
- /rewrite
- }
- elseif ($1 == !vote) {
- if (# != #tenetri) { .notice $nick sorry theres already a poll in #tenetri }
- elseif ($address($nick,2) isin %votenicks) { .notice $nick you cant vote more than once! }
- elseif (!$2) { msg $chan Usage: !vote <what to vote for> }
- elseif ($address($nick,2) !isin %votenicks) && (%pollison == 1) {
- set -e %votenicks $addtok(%votenicks,$address($nick,2),44)
- if (%option1 != $2- && %option2 != $2- && %option3 != $2- && %option4 != $2- && %option5 != $2- && %option6 != $2- && %option7 != $2- && %option8 != $2- && %option9 != $2- && %option10 != $2-) {
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 != $null && %option10 != $null) {
- msg $chan $nick $+ , your vote has not been cast because you must chose one of the available options. Please Re-vote.
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 != $null && %option10 == $null) {
- set %option10 $2-
- write option10.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 != $null && %option9 == $null) {
- set %option9 $2-
- write option9.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 != $null && %option8 == $null) {
- set %option8 $2-
- write option8.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 != $null && %option7 == $null) {
- set %option7 $2-
- write option7.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 != $null && %option6 == $null) {
- set %option6 $2-
- write option6.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 != $null && %option5 == $null) {
- set %option5 $2-
- write option5.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 != $null && %option4 == $null) {
- set %option4 $2-
- write option4.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 != $null && %option3 == $null) {
- set %option3 $2-
- write option3.txt $2-
- goto increase
- }
- if (%option1 != $null && %option2 == $null) {
- set %option2 $2-
- write option2.txt $2-
- goto increase
- }
- if (%option1 == $null) {
- set %option1 $2-
- write option1.txt $2-
- goto increase
- }
- }
- if (%option1 == $2- || %option2 == $2- || %option3 == $2- || %option4 == $2- || %option5 == $2- || %option6 == $2- || %option7 == $2- || %option8 == $2- || %option9 == $2- || %option10 == $2-) {
- :increase
- if (%option1 == $2-) {
- inc %option1votes
- remove option1votes.txt
- /timer 1 2 /write option1votes.txt %option1votes
- }
- if (%option2 == $2-) {
- inc %option2votes
- remove option2votes.txt
- /timer 1 2 /write option2votes.txt %option2votes
- }
- if (%option3 == $2-) {
- inc %option3votes
- remove option3votes.txt
- /timer 1 2 /write option3votes.txt %option3votes
- }
- if (%option4 == $2-) {
- inc %option4votes
- remove option4votes.txt
- /timer 1 2 /write option4votes.txt %option4votes
- }
- if (%option5 == $2-) {
- inc %option5votes
- remove option5votes.txt
- /timer 1 2 /write option5votes.txt %option5votes
- }
- if (%option6 == $2-) {
- inc %option6votes
- remove option6votes.txt
- /timer 1 2 /write option6votes.txt %option6votes
- }
- if (%option7 == $2-) {
- inc %option7votes
- remove option7votes.txt
- /timer 1 2 /write option7votes.txt %option7votes
- }
- if (%option8 == $2-) {
- inc %option8votes
- remove option8votes.txt
- /timer 1 2 /write option8votes.txt %option8votes
- }
- if (%option9 == $2-) {
- inc %option9votes
- remove option9votes.txt
- /timer 1 2 /write option9votes.txt %option9votes
- }
- if (%option10 == $2-) {
- inc %option10votes
- remove option10votes.txt
- /timer 1 2 /write option10votes.txt %option10votes
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment