Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. on *:LOAD: { set %Quote.list }
  2. on *:TEXT:*:#: {
  3. if ($1 == !quote) {
  4. if ($2) {
  5. if ($2 isnum) {
  6. if ($read(Quotes.txt,$2) != $null) { msg $chan Quote $chr(35) $+ $2 $+ : $read(Quotes.txt,$2) }
  7. else { msg # Line doesn't exist }
  8. }
  9. else { msg # Please provide a number }
  10. }
  11. else {
  12. set %lines $rand(1,$lines(Quotes.txt))
  13. msg $chan Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines)
  14. }
  15. }
  16. if ($1 == !addquote) {
  17. if ($address($nick,1) isin %Quote.ban) { msg # You are banned from adding quotes! }
  18. else {
  19. if ($2) {
  20. if ($chr(36) isin $2-) { msg # Invalid Characters! }
  21. else {
  22. write Quotes.txt $2- $+ , Added by $nick
  23. msg # Added!
  24. }
  25. }
  26. }
  27. }
  28. if ($1 == !delquote) {
  29. if ($nick isin %Quote.list) {
  30. if ($2) {
  31. if ($read(Quotes.txt,$2) != $null) {
  32. write -dl $2 Quotes.txt
  33. msg # Line deleted
  34. }
  35. else { msg # Line doesn't exist }
  36. }
  37. }
  38. }
  39. if ($1 == !search) {
  40. if ($2) {
  41. if ($read(Quotes.txt,w,* $+ $2 $+ *) != $null) {
  42. msg # $read(Quotes.txt,w,* $+ $2 $+ *)
  43. }
  44. else { msg # No results found }
  45. }
  46. }
  47. if ($1 == !lastquote) {
  48. set %lines $lines(Quotes.txt)
  49. msg # Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines)
  50. }
  51. }
  52. menu nicklist {
  53. .Add/Del user's
  54. ..$iif($address($1,1) isin %Quote.ban,$style(2)) Add $+($chr(40),$1,$chr(41)): { set %Quote.ban $addtok(%Quote.list,$address($1,1),32) | echo -a User $+($chr(40),$1,$chr(41)) has been added. }
  55. ..$iif($address($1,1) !isin %Quote.ban,$style(2)) Del $+($chr(40),$1,$chr(41)): { set %Quote.ban $remtok(%Quote.list,$address($1,1),1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been removed. }
  56. ..$iif(!%Quote.ban,$style(2)) $+($chr(91),$numtok(%Quote.ban,32),$chr(93)) $+(User's,$chr(58)) List them: { echo -a $gettok(%Quote.list,1-,32) }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement