Advertisement
Xzempt

Untitled

Jun 8th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. /*
  2. alias ninja {
  3. unset %x
  4. unset %y
  5. opensock
  6. %s = sockwrite -n
  7. if (!$window(@ninja)) {
  8. window -eak0 @ninja
  9.  
  10. }
  11. }
  12. alias conn { sockclose ninja* | ninja | set %reconnect off }
  13. alias opensock {
  14. inc %x
  15. if (%x <= 9) {
  16. sockopen ninja $+ %x irc.calmdowngeek.com 6667
  17. if (%x > 9) { unset %x }
  18.  
  19. }
  20.  
  21. }
  22.  
  23. alias register {
  24. %s ninja* PRIVMSG NickServ :register testlol fore@blah.com
  25. }
  26. alias nsident {
  27. %s $sockname PRIVMSG NickServ :identify testlol
  28. }
  29. on *:SOCKOPEN:ninja*: {
  30. inc %y
  31. if (%y <= 9) {
  32. %s $sockname NICK $read(names.txt,%y)
  33. %s $sockname USER $read(names.txt,%y) $read(names.txt,%y) $read(names.txt,%y) $read(names.txt,%y)
  34. %s $sockname PASS aIvHemUId185s&6
  35. }
  36. if (%reconnect != on) {
  37. .timeropen 9 5 opensock
  38. }
  39. if (%y > 9) { unset %y }
  40.  
  41. }
  42.  
  43.  
  44. on *:SOCKREAD:ninja*: {
  45. sockread %ninja | tokenize 32 %ninja
  46. if ($1 == PING) { %s $sockname PONG $2- | haltdef }
  47. if ($2 == NOTICE) && ($7-9 == registered and protected.) { $nsident($sockname) }
  48. if ($2 == NOTICE) && ($4-6 == :Your vhost of) { %s $sockname JOIN #Calmdown }
  49. if ($4 == $chr(40) $+ Throttled:) { sockclose $sockname }
  50. if ($2 == PRIVMSG) {
  51. if ($regex($4, /(ACTION)/)) { echo @ninja 13 $+ $gettok($gettok($1,1,58),1,33) $gettok($5-,1,58) }
  52. if ($3 == #Calmdown) && ($2 == PRIVMSG) {
  53. if (%chance > 95) && (!%insultflood) {
  54. set -u45 %insultflood on
  55. inc %insulted
  56. %rand = $rand(1,9)
  57. %insult = $read(insults.txt,%insulted)
  58. if (%insulted >= $lines(insults.txt)) {
  59. %insulted = 0
  60. %s ninja $+ %rand PRIVMSG $3 : $+ %insult $+ , $gettok($gettok($1,1,58),1,33) $+ .
  61. }
  62. else {
  63. %s ninja $+ %rand PRIVMSG $3 : $+ %insult $+ , $gettok($gettok($1,1,58),1,33) $+ .
  64. }
  65.  
  66. }
  67. if ($gettok($4,1,58) == !addinsult) && ($gettok($gettok($1,1,58),1,33) == Ezrie) { write insults.txt $gettok($4,1,58) | notice $nick "04 $+ $gettok($4,1,58) $+ " was added to insults.txt }
  68. if ($gettok($4,1,58) == !insult) && (!%insultflood) {
  69. if ($5) {
  70. set -u15 %insultflood on
  71. %rand = $rand(1,9)
  72. %insult = $read(insults.txt)
  73. %s ninja $+ %rand PRIVMSG $3 : $+ %insult $+ , $5 $+ .
  74.  
  75. }
  76. else {
  77. if (!$5) && (!%insultflood) {
  78. set -u15 %insultflood on
  79. %rand = $rand(1,9)
  80. %insult = $read(insults.txt)
  81. %s ninja $+ %rand PRIVMSG $3 : $+ %insult $+ .
  82.  
  83. }
  84. }
  85. }
  86. }
  87. else {
  88. echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) $+ 08:15 $gettok($4-,1,58)
  89. }
  90. }
  91. if ($2 == QUIT) {
  92. echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) quits $+ 08:07 $gettok($3-,1,58)
  93. var %i = 1
  94. while (%i <= 9) {
  95. if ($gettok($gettok($1,1,58),1,33) == $read(names.txt,%i)) {
  96. %y = $calc(%i - 1)
  97. sockclose ninja $+ %i
  98. .timerconnect $+ %i 1 2 sockopen ninja $+ %i irc.calmdowngeek.com 6667
  99. inc %i
  100. }
  101. else {
  102. inc %i
  103. }
  104.  
  105. }
  106. }
  107. if ($2 == JOIN) { echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) joined $+ 8:04 $remove($3,$chr(58)) | haltdef }
  108. if ($2 == PART) { echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) parts $+ 8:04 $3- $gettok($4-,1,58) | haltdef }
  109. if ($2 == MODE) { echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) set mode 08 $+ $4 $+ 12 $5 }
  110. if ($2 == TOPIC) { echo @ninja 12 $+ $gettok($gettok($1,1,58),1,33) changed the topic to $+ 08:09 $gettok($4-,1,58) }
  111. if ($2 == NOTICE) { echo @ninja 08Notice:12 $gettok($gettok($1,1,58),1,33) $+ : 06 $+ $gettok($4-,1,58) }
  112. if ($2 == KICK) { echo @ninja $gettok($1,33,1) kicked $4 $+. Reason: $gettok($5-,1,58) | check_channel | %kchan = $3 }
  113. else { echo @ninja $sockname $1 11 $gettok($1,33,1) 2 $2 3 $3 4 $4 5 $5 6 $6 7 $7 8 $8 9 $9- }
  114.  
  115. }
  116. alias check_channel {
  117. var %k = 1
  118. while (%k <= $lines(names.txt)) {
  119. if ($read(names.txt,%k) ison %kchan) {
  120. inc %k
  121. }
  122. else {
  123. %s ninja $+ %k JOIN %kchan
  124. inc %k
  125. }
  126. }
  127. }
  128. on *:SOCKCLOSE:ninja*: {
  129. echo @fore $sockname closed.
  130. set -u5 %reconect on
  131. %y = $calc($right($sockname,1) - 1)
  132. sockopen $sockname irc.calmdowngeek.com 6667
  133. echo @fore ninja $+ %x opened.
  134. }
  135.  
  136. alias chat {
  137. if (!$1) {
  138. echo -a Please insert which socket you are speaking from.
  139. echo -a socket 1 is Xzempt
  140. echo -a socket 2 is katano
  141. echo -a socket 3 is ariya
  142. echo -a socket 4 is jade
  143. echo -a socket 5 is star
  144. echo -a socket 6 is willow
  145. echo -a socket 7 is amanda
  146. echo -a socket 8 is kiyoura
  147. echo -a socket 9 is jess
  148.  
  149. }
  150. else {
  151. %s ninja $+ $1 PRIVMSG #calmdown : $+ $2-
  152. }
  153. }
  154. on *:TEXT:*:*: {
  155. if ($1 == !reconn) && ($chan == #opers) {
  156. conn
  157. }
  158. if (!%chance) && ($chaan == #calmdown) {
  159. %chance = $rand(1,100)
  160. }
  161. else {
  162. %chance = $rand(1,100)
  163. }
  164. }
  165.  
  166. on *:CONNECT: {
  167. if ($network == CalmDownGeek) {
  168. %reconnect = on
  169. %x = 1
  170. unset %y
  171. unset %socks
  172. while (%x <= $lines(names.txt)) {
  173. if ($sock(ninja $+ %x)) {
  174. %socks = $instok(%socks, ninja $+ %x,$calc($numtok(%socks,46) +1), 46)
  175. inc %x
  176. }
  177. else {
  178. sockclose ninja $+ %x
  179. %y = $calc(%x -1 )
  180. sockopen ninja $+ %x irc.calmdowngeek.com 6667
  181. inc %x
  182. }
  183. }
  184. }
  185. }
  186. alias testadd {
  187. %x = 1
  188. while (%x <= $lines(names.txt)) {
  189. if ($sock(ninja $+ %x)) {
  190. %socks = $instok(%socks, ninja $+ %x,$calc($numtok(%socks,46) +1), 46)
  191. inc %x
  192. }
  193. else { inc %x }
  194. }
  195. }
  196. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement