Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON !*:TEXT:*:#: {
- if (%giveawaystart_ [ $+ [ $chan ] ]) {
- if ($1 == %giveawaymsg_ [ $+ [ $chan ] ]) {
- if ($read(Raffle_ $+ $chan $+ .txt,nw,$nick)) { msg # ( $+ $nick $+ ): You are already into the list! | return }
- write Raffle_ $+ $chan $+ .txt $nick
- msg # ( $+ $nick $+ ): You have been added to the list.
- }
- }
- if ($1 == !giveawayend) {
- if (!%giveawaystart_ [ $+ [ $chan ] ]) { msg # ( $+ $nick $+ ): There is NOT any giveaway at the moment! | return }
- var %user = $read(Raffle $+ _ $+ $chan $+ .txt,n)
- if ($nick isop #) {
- unset %giveawaystart_ [ $+ [ $chan ] ]
- unset %giveawaymsg_ [ $+ [ $chan ] ]
- unset %giveawaynick_ [ $+ [ $chan ] ]
- if (%user) {
- msg # ( $+ $nick $+ ): Giveaway has ended, the winner is: %user
- if ($isfile(Raffle_ $+ $chan $+ .txt)) { .remove $qt(Raffle_ $+ $chan $+ .txt) }
- }
- else { msg # ( $+ $nick $+ ): There is NOT any winner available }
- }
- elseif ($nick !isop #) { msg # ( $+ $nick $+ ): You are NOT an channel operator! }
- }
- if ($1 == !giveawaystart) {
- if ($nick isop #) {
- if ($2) {
- if (%giveawaystart_ [ $+ [ $chan ] ]) { msg # ( $+ $nick $+ ): There is an other giveaway at the moment! | return }
- set -e %giveawaystart_ [ $+ [ $chan ] ] On
- set -e %giveawaymsg_ [ $+ [ $chan ] ] $2
- set -e %giveawaynick_ [ $+ [ $chan ] ] $nick
- msg # ( $+ $nick $+ ): Giveaway started, the word/phrase to join is $qt($2)
- if ($isfile(Raffle_ $+ $chan $+ .txt)) { .remove $qt(Raffle_ $+ $chan $+ .txt) }
- }
- elseif (!$2) { msg # ( $+ $nick $+ ): Please enter a word for the giveaway trigger. }
- }
- elseif ($nick !isop #) { msg # ( $+ $nick $+ ): You are NOT an channel operator! }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement