Advertisement
Xzempt

Untitled

May 26th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.01 KB | None | 0 0
  1. on *:TEXT:*:#elunacy,#oper,#opers,#blaze.u,#molten: {
  2. if (!%quoteflood) {
  3. if ($1 == !addquote) && (!$2) {
  4. set -u5 %quoteflood on
  5. msg $chan Add a quote idiot.
  6. }
  7. if ($1 == !addquote) && ($2) {
  8. userip $nick
  9. if (%nickcheck != $readini(quoteban.ini,$chan,$nick)) {
  10. if ($chr(191) !isin $2-) {
  11. set -u5 %quoteflood on
  12. write quotes.txt $2- ¿ Added: $adate ¿ By: $nick
  13. msg $chan 11(14Quote Added: $chr(35) $+ $lines(quotes.txt) $+ 11)
  14. }
  15. elseif (%nickcheck == $readini(quoteban.ini,$chan,$nick)) {
  16. set -u5 %quoteflood on
  17. notice $nick Sorry $nick $+ , You have been banned from using this command.
  18. }
  19. else {
  20. set -u5 %quoteflood on
  21. msg $chan 04Error: Please try again without " $+ $chr(191) $+ ".
  22. }
  23. }
  24. }
  25. if ($1 == !quote) && (!$2) {
  26. set -u5 %quoteflood on
  27. set -u5 %quote $read(quotes.txt)
  28. %line = $readn
  29. msg $chan 14Quote Number:04 %line $+  $gettok(%quote,1,191) 14- $gettok(%quote,2,191) $gettok(%quote,3,191)
  30. unset %line
  31. }
  32. if ($1 == !quote) && ($2 isnum) {
  33. set -u5 %quoteflood on
  34. set -u5 %quote $gettok($read(quotes.txt,$2),1,191)
  35. if (%quote != $null) {
  36. msg $chan 14Quote Number:04 $2 $+  $gettok($read(quotes.txt,$2),1,191) 14- $gettok($read(quotes.txt,$2),2,191) $gettok($read(quotes.txt,$2),3,191)
  37. }
  38. else {
  39. set -u5 %quoteflood on
  40. msg $chan 04Error: The quote you specified does not exist.
  41. }
  42. }
  43. if ($1 == !quote) && ($2 != $null) {
  44. if ($2 !isnum) {
  45. msg $chan 04Error: 14Try !randquote $2 or !findquote intext $2 $+ . This command only accepts quote numbers.
  46. }
  47. }
  48. if ($1 == !quotehelp) {
  49. set -u5 %quoteflood on
  50. .notice $nick 04Remember that all commands 2nd/3rd parameter are without the < > symbols.
  51. .notice $nick The list of commands are as follows:
  52. .notice $nick 14!quote <number> <- optional number. This command will display a completely random quote. If a number is supplied it will display the corresponding quote number.
  53. .notice $nick 14!addquote <your quote here> This command allows you to add a quote to the database.
  54. .notice $nick 14!delquote <number> number = the quote number
  55. .notice $nick 14!findquote intext <search paramaters here> . i.e !findquote intext fuck your face
  56. .notice $nick 14!quoteban <name here> (bans them from adding quotes only) (( 04Channel ops only ))
  57. .notice $nick 14!delquoteban <name here> (removes the ban on their add quote priviledges.) (( 04Channel ops only ))
  58. .notice $nick 14!randquote <search params here> (more or less the same as !findquote instead of giving you a list of quote numbers this will auto choose a quote matching your search parameters and display it)
  59. }
  60. if ($1 == !quotes) {
  61. set -u5 %quoteflood on
  62. msg $chan Their are a total of $lines(quotes.txt) quotes.
  63. }
  64. if ($1 == !findquote) && ($2 == intext) && ($3) {
  65. set -u5 %quoteflood on
  66. %chan = $chan
  67. msg $chan Searching, please wait...
  68. unset %qnumber
  69. set -u5 %search $3-
  70. search
  71. }
  72. if ($1 == !randquote) {
  73. if ($2) {
  74. set -u5 %quoteflood on
  75. %chan = $chan
  76. unset %qnumber
  77. set -u5 %search $2-
  78. rsearch
  79. }
  80. else {
  81. set -u5 %quoteflood on
  82. msg $chan 04Error: Please supply a 2nd parameter.
  83. }
  84. }
  85. if ($1 == !findquote) && ($2 == intext) && (!$3) {
  86. set -u5 %quoteflood on
  87. msg $chan 04Error: Please supply a 3rd parameter.
  88. }
  89. if ($nick isop $chan) {
  90. if ($1 == !delquote) && ($2 isnum) {
  91. set -u5 %delquote $read(quotes.txt,$2)
  92. if (%delquote != $null) {
  93. set -u5 %quoteflood on
  94. write -dl $2 quotes.txt
  95. msg $chan 11(14Quote: $chr(35) $+ $2 Deleted.11)
  96. }
  97. else {
  98. set -u5 %quoteflood on
  99. msg $chan 04Error: The quote you specified does not exist.
  100. }
  101. }
  102. if ($1 == !delquote) && ($2 !isnum) {
  103. msg $chan 04Error: Syntax is !delquote 69 (69 = number of the quote)
  104.  
  105. }
  106. if ($1 == !delquote) && (!$2) {
  107. set -u5 %quoteflood on
  108. msg $chan 04Error: Syntax is !delquote number
  109. }
  110. if ($1 == !quoteban) && (!$2) {
  111. set -u5 %quoteflood on
  112. msg $chan 04Error: Please supply a 2nd parameter.
  113. }
  114. if ($1 == !quoteban) && ($2) {
  115. if ($2 != $me) {
  116. userip $2
  117. if (%nickcheck != $null) {
  118. set -u5 %quoteflood on
  119. writeini quoteban.ini $chan $2 %nickcheck
  120. notice $nick 14" $+ $2 $+ 's" host was added to quote ban.
  121. }
  122. else {
  123. set -u5 %quoteflood on
  124. notice $nick Nick: $2 does not exist, please try again.
  125. }
  126. }
  127.  
  128. if ($1 == !quoteban) && ($2 == $me) {
  129. set -u5 %quoteflood on
  130. msg $chan 4Error: You can not ban me from the add quote command.
  131.  
  132. }
  133. }
  134. if ($1 == !delquoteban) && ($2) {
  135. userip $2
  136. if (%nickcheck == $readini(quoteban.ini,$chan,$2)) {
  137. set -u5 %quoteflood on
  138. remini quoteban.ini $chan $2
  139. notice $nick $2 was removed from the quote ban list.
  140. }
  141. else {
  142. set -u5 %quoteflood on
  143. notice $nick Nick: $2 does not exist, please try again.
  144. }
  145. }
  146. }
  147. if ($1 == !quoteban) || ($1 == !delquoteban) || ($1 == !delquote) && ($2) && ($nick !isop $chan) {
  148. set -u5 %quoteflood on
  149. notice $nick 04Error: You do not have access to this command $nick $+ .
  150.  
  151. }
  152. }
  153. }
  154. alias rsearch {
  155. %x = 0
  156. while (%x <= $lines(quotes.txt)) {
  157. if (* $+ %search $+ * iswm $gettok($read(quotes.txt,%x),1,191)) {
  158. set -u5 %qnumber %qnumber $chr(35) $+ $readn
  159. inc %x
  160. }
  161. else {
  162. inc %x
  163. .timermsg 1 1 displayrand
  164. }
  165. }
  166. }
  167. alias displayrand {
  168. %rquote = $rand(1,$numtok(%qnumber,32))
  169. %quote = $read(quotes.txt,$remove($gettok(%qnumber,%rquote,32),$chr(35)))
  170. if (%quote != $null) {
  171. msg %chan 14Quote Number:04 $remove($gettok(%qnumber,%rquote,32),$chr(35)) $+  $replace($gettok(%quote,1,191),%search,04 $+ %search $+ ) 14- $gettok(%quote,2,191) $gettok(%quote,3,191)
  172. unset %quote %rquote %qnumber %search
  173. }
  174. else {
  175. msg %chan 04Error: Their are no quotes containing what you specified.
  176. }
  177. }
  178.  
  179. alias search {
  180. %x = 0
  181. while (%x <= $lines(quotes.txt)) {
  182. if (* $+ %search $+ * iswm $gettok($read(quotes.txt,%x),1,191)) {
  183. set -u5 %qnumber %qnumber $chr(35) $+ $readn
  184. inc %x
  185. }
  186. else {
  187. inc %x
  188. .timerdisplay 1 1 displayq
  189. }
  190. }
  191. }
  192.  
  193. alias displayq {
  194. if (%qnumber != $null) {
  195. msg %chan $numtok(%qnumber,32) Quotes found. Quote Numbers: %qnumber
  196. }
  197. else {
  198. msg %chan $numtok(%qnumber,32) Quotes found.
  199. }
  200. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement