Quote script. (Need help,) - 26/03/08 06:43 PM
I need help, to make the "script" tell me if I added the quote, or not.
Here is the script. (Please tell me if there is any personl info I should edit out.)
When I use the !addquote I have to check in the quote text file.. (To see if it was added, I migh have spelled wrong, etcetera..)
I am kind of paranoid.
So, is there a way to make "me" notice myself, or something, when ever a new quote is added to the text file?
Here is the script. (Please tell me if there is any personl info I should edit out.)
Code:
;--------------------------------------------------------------------------------------------------------: ; ; - !quotes!cript... ; on *:text:!quote*:*: { if ($level($address($nick,8)) == Quote.Ban) { return } else var %who = $nick if (%quote.delay) { .msg $nick Please try again after random delay of: $duration(%quote.delay) return } else { var %delay = $rand(25,35) set -u [ $+ [ %delay ] ] %quote.delay %delay } if ($chan) { if (!$istok(#narkotika #paranormal #Invision #mensa #sirstargazer #quote #gomp #quotes! #freethought #spiritual #4threich #normal #spirit! #asylum #♥ #astral #br1 #TheSpot #philosophy #philosophy! #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #immortal-technique #felles #tv.no #chemistry #filosofi #NanoTechnology #åndelig #ganja #Le·g·ion! #innvikling #Truth #Gudene #shamanism #christian #innsikt #2012 #utvikling #sms.no #tao #rytmeboksen #dreamt #3d_life #archangels #spiritual #ascension #ugdulf #dreaming #spirituality #buddhism #shrooms #psychedelics #spiritual #narkotika #filosofisk #filosofi #åndelighet,$chan,32)) { return } var %who = $chan } if ($2) { if ($2 !isnum) { window -h @quote.search loadbuf -r @quote.search quotes.txt var %quote.temp $fline(@quote.search,$+(*,$2-,*),0) if (%quote.temp isnum 1-20) { var %i = 1,%quote.match while ($fline(@quote.search,$+(*,$2-,*),%i)) { %quote.match = $addtok(%quote.match,$v1,44) inc %i } msg $chan Matches for $2 --> %quote.match window -c @quote.search } elseif (%quote.temp == 0) { msg $chan No match found. } else { msg $chan More than 20 matches found, please narrow your search down } } else { if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $2 doesn't exist. | return } msg %who $read(quotes.txt,$2) } } elseif ($1 == !quotes) { msg %who Total quotes!: $lines(quotes.txt) } else { msg %who $read(quotes.txt) } } on *:text:!addquote*:*: { if ($2 == $null) { .notice $nick You need to include a quote to add. } if (%quote.delay) { .msg $nick Please try again after random delay of: $duration(%quote.delay) return } else { var %delay = $rand(25,35) set -u [ $+ [ %delay ] ] %quote.delay %delay } write quotes.txt $2- } menu nicklist { !Quote Ban: auser Quote.Ban $address($snick($chan,1),8) } on *:input:*: { if ($1 == !quote) { var %who = $iif($chan,$chan,$me) if ($chan) { if (!$istok(#narkotika #Invision #paranormal #sirstargazer #♥ #freethought #gomp #quote #quotes! #spiritual #mensa #asylum #4threich #spirit! #normal #astral #br1 #TheSpot #philosophy #philosophy! #ddayhome #shroomery #spiritualmaterialism #coders #TheTruth #felles #immortal-technique #felles #tv.no #chemistry #filosofi #NanoTechnology #åndelig #ganja #Le·g·ion! #innvikling #Truth #Gudene #shamanism #christian #innsikt #2012 #utvikling #sms.no #tao #rytmeboksen #dreamt #3d_life #archangels #spiritual #ascension #ugdulf #dreaming #spirituality #buddhism #shrooms #psychedelics #spiritual #narkotika #filosofisk #filosofi #åndelighet,$chan,32)) { return } } if ($2) { if ($2 !isnum) { window -h @quote.search loadbuf -r @quote.search quotes.txt var %quote.temp $fline(@quote.search,$+(*,$2-,*),0) if (%quote.temp isnum 1-20) { var %i = 1,%quote.match while ($fline(@quote.search,$+(*,$2-,*),%i)) { %quote.match = $addtok(%quote.match,$v1,44) inc %i } msg $chan Matches for $2 --> %quote.match window -c @quote.search } elseif (%quote.temp == 0) { msg $chan No match found. } else { msg $chan More than 20 matches found, please narrow your search down } } else { if ($lines(quotes.txt) < $2) { msg %who Quote $chr(35) $+ $2 doesn't exist. | return } msg %who $read(quotes.txt,$2) } } else { msg %who $read(quotes.txt) } } elseif ($1 == !quotes) { msg %who Total quotes!: $lines(quotes.txt) } elseif ($1 == !addquote) { if ($2 == $null) { echo -a You need to include a quote to add. } else write quotes.txt $2- } } on *:text:!help:#: { if (%quote.delay) { .msg $nick Please try again after random delay of: $duration(%quote.delay) return } else { var %delay = $rand(25,35) set -u [ $+ [ %delay ] ] %quote.delay %delay } msg $nick Available commands: !quote, !quotes, !quote "number", and !addquote "quote" - Author. And: !quote "word" to search... } :-----------------
When I use the !addquote I have to check in the quote text file.. (To see if it was added, I migh have spelled wrong, etcetera..)
I am kind of paranoid.
So, is there a way to make "me" notice myself, or something, when ever a new quote is added to the text file?