Advertisement
Guest User

Untitled

a guest
Nov 14th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. ON !*:TEXT:!*:#: {
  2. tokenize 32 $strip($1-,burci)
  3. if ($1 == !quote) {
  4. if (!$2) { quote random }
  5. elseif ($2) { quote $2- }
  6. }
  7. }
  8.  
  9. alias quote {
  10. if ($1 == add) {
  11. if ($read(modlist.txt,nw,$nick)) {
  12. var %n $ini(quotes.ini,#,0)
  13. inc %n
  14. writeini quotes.ini # %n $2-
  15. msg # Quote $chr(35) $+ %n added.
  16. }
  17. }
  18.  
  19. else {
  20. if ((%timerquote) || ($($+(%,timerquote.,$nick),2))) { return }
  21. set -u30 %timerquote On
  22. set -u30 %timerquote. $+ $nick On
  23. if ($read(modlist.txt,nw,$nick)) {
  24. var %1 $iif($left($1,1) == $chr(35),$mid($1,2-),$1)
  25. if (%1 !isnum) {
  26. if (%1 == random) {
  27. var %n $ini(quotes.ini,#,0)
  28. var %rng $rand(1,%n)
  29. msg # $chr(35) $+ %rng $+ : $readini(quotes.ini,n,#,%rng)
  30. }
  31. }
  32.  
  33. else {
  34. var %n $ini(quotes.ini,#,0)
  35. var %i 1
  36. while (%i <= %n) {
  37. var %read $readini(quotes.ini,n,#,%i)
  38. if ($1- isin %read) msg # Quote $chr(35) $+ %i $+ : $v2
  39. inc %i
  40. }
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement