Clearing lines after use? - 11/05/15 02:10 AM
Currently running a raffle script that ended up looking like this.
Obvious problem is that this might result in the same name getting drawn twice or more. How do I clear the line of text after it has been used? The only way of clearing a .txt I know of is write -c (.txt) which cleares the entire file..
Code:
if (%rafflestatus) { .timer 1 1 msg $chan /me $read(Raffle.txt,n) won! .timer 1 6 msg $chan /me $read(Raffle.txt,n) has won too! .timer 1 9 msg $chan /me $read(Raffle.txt,n) is the third winner! .timer 1 12 msg $chan /me Congrats, $read(Raffle.txt,n) you won! .timer 1 15 msg $chan /me Last but not least, we have $read(Raffle.txt,n) $+ ! unset %rafflekey unset %rafflestatus }
Obvious problem is that this might result in the same name getting drawn twice or more. How do I clear the line of text after it has been used? The only way of clearing a .txt I know of is write -c (.txt) which cleares the entire file..