Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:*:#:{
- if ($1 == .addquote) {
- write quotes.txt $2-
- msg $chan Quote added! }
- if ($1 == .quotenumber) {
- msg $chan I currently have $lines(quotes.txt) quotes stored. }
- if ($1 == .quote) {
- if ($2 == $null) {
- set %quotenum $rand(1,$lines(quotes.txt))
- msg $chan Quote %quotenum $+ : $read(quotes.txt, %quotenum)
- unset %quotenum }
- if ($2 != $null) {
- msg $chan Quote $2 $+ : $read(quotes.txt, $2) } }
- if ($1 == .removequote) {
- write -dl $+ $2 quotes.txt
- msg $chan Quote $2 deleted. }
- if ($1 == .quotesearch) && ($2 != $null) {
- msg $chan Quote results for " $+ $2- $+ ":
- set %line 1
- while (%line <= $lines(quotes.txt)) {
- set %quoteline $read(quotes.txt, %line)
- if ($2- isin %quoteline) {
- msg $chan Quote %line $+ : %quoteline
- set %resultsfound true }
- inc %line }
- if (%line > $lines(quotes.txt)) && (%resultsfound != true) {
- msg $chan No results found. }
- unset %resultsfound
- unset %quoteline
- unset %line } }
Advertisement
Add Comment
Please, Sign In to add comment