Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!*:#: {
- if ($right($1,-1) == quote) {
- if (((%floodquote) || ($($+(%,floodquote.,$nick),2))) && ( $nick)) {
- if ($nick isop $chan) { msg # [Random Quote] $read(quotes.txt,n) }
- else { return }
- {
- set -u60 %floodquote On
- set -u240 %floodquote. $+ $nick On
- }
- }
- if (!$2) { msg # [Random Quote] $read(quotes.txt,n) }
- elseif ($2 == del) && ($3 isnum) && ($lines(quotes.txt) >= $3) && ($nick isop #) { msg # [Quote Deleted] $3 $+ : $read(quotes.txt, $+ $3) | .write -dl $+ $3 quotes.txt }
- elseif ($2 isnum) && ($lines(quotes.txt) >= $2) { msg # [Quote $+($2,/,$lines(quotes.txt),]) $read(quotes.txt,n,$2) }
- elseif ($2 == find) && ($len($3) > 2) {
- var %x $lines(quotes.txt)
- while (%x) {
- if ($3- isin $read(quotes.txt,%x)) {
- inc %quotes.search
- set %quotes.return $addtok(%quotes.return,%x,32)
- }
- dec %x
- }
- if (!%quotes.search) { msg # [Quote Search] No quotes found with the string " $+ $3- $+ " | unset %quotes.* | halt }
- if (%quotes.search = 1) { msg # [Quote Search] One quote found: $+([,%quotes.return,]) $read(quotes.txt,n,%quotes.return) | unset %quotes.* }
- else {
- msg # [Quote Search] Found %quotes.search quotes that have the string $+(",$3-,") in them.
- .timer 1 2 msg # [Quote $+($gettok(%quotes.return,1,32),/,$lines(quotes.txt),]) $replace($read(quotes.txt, n, $gettok(%quotes.return,1,32)),|,$!chr(124))
- .timer 1 4 msg # [Quote Search] Other quote numbers: $right(%quotes.return,-2)
- unset %quotes.*
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement