Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1.  
  2.  
  3. on *:TEXT:!*:#: {
  4. ;---------- quote --------------------------------------------------------------------------------
  5. if ($right($1,-1) == quote) {
  6. if (((%floodquote) || ($($+(%,floodquote.,$nick),2))) && ($nick)) { return }
  7. {
  8. set -u30 %floodquote On
  9. set -u30 %floodquote. $+ $nick On
  10. }
  11. :1
  12. if (!$2) { msg # [Random Quote] $read(quote.ini,n) }
  13. elseif ($2 == del) && ($3 isnum) && ($lines(quote.ini) >= $3) && ($nick isop #) { msg # [Quote Deleted] $3 $+ : $read(quote.ini, $+ $3) | .write -dl $+ $3 quote.ini }
  14. elseif ($2 isnum) && ($lines(quote.ini) >= $2) { msg # [Quote $+($2,/,$lines(quote.ini),]) $read(quote.ini,n,$2) }
  15. elseif ($2 == find) && ($len($3) > 2) {
  16. var %x $lines(quote.ini)
  17. while (%x) {
  18. if ($3- isin $read(quote.ini,%x)) {
  19. inc %quotes.search
  20. set %quotes.return $addtok(%quotes.return,%x,32)
  21. }
  22. dec %x
  23. }
  24. if (!%quotes.search) { msg # [Quote Search] No quotes found with the string " $+ $3- $+ " | unset %quotes.* | halt }
  25. if (%quotes.search = 1) { msg # [Quote Search] One quote found: $+([,%quotes.return,]) $read(quote.ini,n,%quotes.return) | unset %quotes.* }
  26. else {
  27. msg # [Quote Search] Found %quotes.search quotes that have the string $+(",$3-,") in them.
  28. .timer 1 2 msg # [Quote $+($gettok(%quotes.return,1,32),/,$lines(quote.ini),]) $replace($read(quote.ini, n, $gettok(%quotes.return,1,32)),|,$!chr(124))
  29. .timer 1 4 msg # [Quote Search] Other quote numbers: $right(%quotes.return,-2)
  30. unset %quotes.*
  31. }
  32. }
  33.  
  34.  
  35. }
  36. on *:TEXT:!*:#:{
  37. if ($right($1,-1) == addquote) && ($nick isop#) {
  38. if (!$2) { return }
  39. .write quote.ini " $+ $replace($2-,|,$chr(124)) $+ " - Tortoisehelmet $date
  40. msg # [Quote Added] $+($lines(quote.ini),:) $2-
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement