Advertisement
SpliftOn

Cl0NeKiCkEr

Sep 28th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.49 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;;;;;H;;;A;;;C;;;K;;;M;;;A;;;N;;;;;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;YOU ONLY NEED TO LOAD THIS FILE ON A REMOTE WITH mIRC;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. menu * {
  7. Cl0NeKiCkEr
  8. .Configuration : /clonekick
  9. }
  10.  
  11. on *:start:{
  12. if ($exists(htables) == $false) { mkdir htables }
  13. hmake cloneconf 100
  14. if ($exists(htables/cloneconf) == $false) {
  15. hadd cloneconf Nghost 1
  16. hadd cloneconf BAN 4
  17. hadd cloneconf chan $null
  18. hadd cloneconf nick $null
  19. hadd cloneconf message $null
  20. hsave cloneconf htables/cloneconf
  21. }
  22.  
  23. hload cloneconf htables/cloneconf
  24. }
  25.  
  26. alias clonekick { dialog -m clonekick clonekick }
  27. dialog clonekick {
  28. title Cl0neKicker : MADE BY HACKMAN[TeTa]
  29. icon mirc.exe,18
  30. size -1 -1 200 100
  31. option dbu
  32. tab "Channel", 10, 10 12 183 70
  33. tab "Except", 20
  34. tab "Message", 30
  35. tab "Config +", 40
  36.  
  37. box "",1,5 0 192 97
  38. check ": clonekick State ON/OFF",2,68 4 80 10
  39. ;--------TAB10-------
  40. text "Channel Used (with #):",11,12 30 80 10, tab 10
  41. edit "",12,11 40 150 10, tab 10
  42. list 13,11 50 150 40,sort vsbar tab 10
  43. button "Add",14,161 50 30 10,push tab 10
  44. button "Remove",15,161 60 30 10,push tab 10
  45. ;--------TAB20-------
  46. text "Exception (type the nick of the exeption :NEED TO BE ONLINE)",21,12 30 180 10, tab 20
  47. edit "",22,11 40 150 10, tab 20
  48. list 23,11 50 150 40,sort vsbar tab 20
  49. button "Add",24,161 50 30 10,push tab 20
  50. button "Remove",25,161 60 30 10,push tab 20
  51.  
  52. ;--------TAB30-------
  53. text "Kick message",31,12 30 180 10, tab 30
  54. text "you can type CLONE1 or CLONE2 on the message , those values will be replaced by the nicks of both clones (CLONE1 = kicked one)",32,12 38 180 20, tab 30
  55. text "If you don't set one, it will use a default one ",34,12 51 180 10, tab 30
  56. edit "",33,11 60 180 10, tab 30
  57.  
  58. ;--------TAB40-------
  59. text "Max Clone Number Per Channel",41,20 30 170 10, tab 40
  60. edit "",43,20 40 80 10, tab 40
  61. text "Number Of Rejoin/Kick Before BAN",44,20 55 170 10, tab 40
  62. edit "",45,20 65 80 10, tab 40
  63.  
  64. ;--------QUIT&SAVE-------
  65. button "Close&Save",9,80 87 40 10,flat,ok
  66. icon 4,160 2 20 20,mirc.exe,18,large
  67. }
  68.  
  69. on *:dialog:clonekick:sclick:14:{
  70. if ($did(12) isin $hget(cloneconf,chan)) { did -ra clonekick 12 Already on the list ! }
  71. else {
  72. hadd -m cloneconf chan $iif($hget(cloneconf,chan), $hget(cloneconf,chan) $+ $chr(32) $+ $did(12), $did(12))
  73. }
  74. did -r clonekick 13
  75. didtok clonekick 13 32 $hget(cloneconf,chan)
  76. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  77. else { did -e clonekick 2,9 }
  78. }
  79. on *:dialog:clonekick:sclick:15:{
  80. hadd cloneconf chan $replacex($remove($hget(cloneconf,chan), $did(13).seltext), $chr(32) $+ $chr(32), $chr(32))
  81. did -r clonekick 13
  82. didtok clonekick 13 32 $hget(cloneconf,chan)
  83. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  84. else { did -e clonekick 2,9 }
  85. }
  86. on *:dialog:clonekick:sclick:24:{
  87. if ($address($did(22),4) isin $hget(cloneconf,nick)) { did -ra clonekick 22 Already on the list ! }
  88. else {
  89. hadd -m cloneconf nick $iif($hget(cloneconf,nick), $hget(cloneconf,nick) $+ $chr(32) $+ $address($did(22),4), $address($did(22),4))
  90. }
  91. did -r clonekick 23
  92. didtok clonekick 23 32 $hget(cloneconf,nick)
  93. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  94. else { did -e clonekick 2,9 }
  95. }
  96. on *:dialog:clonekick:sclick:25:{
  97. hadd cloneconf nick $replacex($remove($hget(cloneconf,nick), $did(23).seltext), $chr(32) $+ $chr(32), $chr(32))
  98. did -r clonekick 23
  99. didtok clonekick 23 32 $hget(cloneconf,nick)
  100. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  101. else { did -e clonekick 2,9 }
  102. }
  103. on *:dialog:clonekick:sclick:9:{
  104. hadd cloneconf Nghost $did(43)
  105. hadd cloneconf BAN $did(45)
  106. if ($did(33) == $null) { hadd cloneconf message No Clones admitted *( $+(%,clone.nick1) & $+(%,clone.nick2) )* }
  107. else { hadd cloneconf message $replace($did(33), CLONE1, $+(%,clone.nick1), CLONE2, $+(%,clone.nick2)) }
  108. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  109. else { did -e clonekick 2,9 }
  110.  
  111. hsave cloneconf htables/cloneconf
  112. }
  113. on *:dialog:clonekick:edit:43:{
  114. hadd cloneconf Nghost $did(43)
  115. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  116. else { did -e clonekick 2,9 }
  117. }
  118. on *:dialog:clonekick:edit:45:{
  119. hadd cloneconf BAN $did(45)
  120. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  121. else { did -e clonekick 2,9 }
  122. }
  123. on *:dialog:clonekick:init:0:{
  124. did -r clonekick 13
  125. didtok clonekick 13 32 $hget(cloneconf,chan)
  126. did -r clonekick 23
  127. didtok clonekick 23 32 $hget(cloneconf,nick)
  128. if (%CLONEKICK.State == ON) { did -c clonekick 2 }
  129. if (!$hget(cloneconf,chan)) || (!$hget(cloneconf,Nghost)) || (!$hget(cloneconf,BAN)) { did -b clonekick 2,9 }
  130. else { did -e clonekick 2,9 }
  131. did -r clonekick 43
  132. didtok clonekick 43 32 $hget(cloneconf,Nghost)
  133. did -r clonekick 45
  134. didtok clonekick 45 32 $hget(cloneconf,BAN)
  135. }
  136. on *:dialog:clonekick:sclick:2:{
  137. if $did(2).state == 1 { set %CLONEKICK.State ON | echo -a %CLONEKICK.Chan 4 clonekick : 2ON 6annoying $hget(cloneconf,chan) }
  138. else { set %CLONEKICK.State OFF | echo -a %CLONEKICK.Chan 4 clonekick : 2OFF }
  139. }
  140.  
  141. alias clonestart {
  142. .who %clone.chan
  143. var %nnick = 1
  144. while (%nnick <= $nick(%clone.chan,0)) {
  145. var %address = $address($nick(%clone.chan,%nnick),4)
  146. hadd $+(clonekick,%clone.chan) %address $iif($hget($+(clonekick,%clone.chan),%address) == $null, $nick(%clone.chan,%nnick), $hget($+(clonekick,%clone.chan),%address) $+ $chr(32) $+ $nick(%clone.chan,%nnick))
  147. tokenize 32 $hget($+(clonekick,%clone.chan),%address)
  148. while ($0 > $hget(cloneconf,Nghost)) {
  149. var %clone.nick1 = $1
  150. var %clone.nick2 = $2
  151. if (%address == $address($me,4)) || (%address isin $hget(cloneconf,nick)) { echo -a %clone.nick excepted | break }
  152. hadd $+(clonekick,%clone.chan) %address $remove($hget($+(clonekick,%clone.chan),%address), $1)
  153. $iif(!$($+(%,ban,$1),2),set -u10,inc) $+(%,ban,$1) 1
  154. if ($($+(%,ban,$1),2) > $hget(cloneconf,BAN)) { ban -u30 %clone.chan $1 }
  155. kick %clone.chan $1 $($hget(cloneconf,message),2)
  156. tokenize 32 $hget($+(clonekick,%clone.chan),%address)
  157. }
  158. inc %nnick
  159. }
  160. }
  161. alias clonejoin {
  162. if (!$address(%clone.nick,4)) { .who %clone.chan }
  163. var %address.join = $address(%clone.nick,4)
  164. hadd -m $+(clonekick,%clone.chan) %address.join $iif($hget($+(clonekick,%clone.chan), %address.join) == $null, %clone.nick, $hget($+(clonekick,%clone.chan), %address.join) $+ $chr(32) $+ %clone.nick)
  165. tokenize 32 $hget($+(clonekick,%clone.chan), %address.join)
  166. while ($0 > $hget(cloneconf,Nghost)) {
  167. var %clone.nick1 = $1
  168. var %clone.nick2 = $2
  169. if (%address.join == $address($me,4)) || (%address.join isin $hget(cloneconf,nick)) { echo -a %clone.nick excepted | return }
  170. hadd $+(clonekick,%clone.chan) %address.join $remove($hget($+(clonekick,%clone.chan), %address.join), $1)
  171. kick %clone.chan $1 $($hget(cloneconf,message),2)
  172. tokenize 32 $hget($+(clonekick,%clone.chan),%address.join)
  173. }
  174. }
  175.  
  176. on *:join:*:{
  177. if (%CLONEKICK.State == ON) {
  178. if ($chan isin $hget(cloneconf,chan)) {
  179. set %clone.nick $nick
  180. set %clone.chan $chan
  181. if ($nick == $me) {
  182. var %nchan = 1
  183. while ($gettok($hget(cloneconf,chan),%nchan,32)) {
  184. .who $gettok($hget(cloneconf,chan),%nchan,32)
  185. inc %nchan
  186. }
  187. hfree $+(clonekick,%clone.chan)
  188. hmake $+(clonekick,%clone.chan) 1000
  189. timer 1 1 clonestart
  190. }
  191. else { clonejoin }
  192. }
  193. }
  194. }
  195. on *:part:*:{
  196. if (%CLONEKICK.State == ON) {
  197. if ($chan isin $hget(cloneconf,chan)) {
  198. var %address.part = $address($nick,4)
  199. hadd $+(clonekick,$chan) %address.part $replace($removecs($hget($+(clonekick,$chan), %address.part), $nick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
  200. }
  201. }
  202. }
  203. on *:kick:*:{
  204. if (%CLONEKICK.State == ON) {
  205. if ($chan isin $hget(cloneconf,chan)) {
  206. var %address.part = $address($knick,4)
  207. hadd $+(clonekick,$chan) %address.part $replace($removecs($hget($+(clonekick,$chan), %address.part), $knick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
  208. }
  209. }
  210. }
  211.  
  212. on *:quit:{
  213. if (%CLONEKICK.State == ON) {
  214. tokenize 32 $hget(cloneconf,chan))
  215. var %chann = 1
  216. var %chane = $($+($,%chann),2)
  217. while (%chane) {
  218. var %address.part = $address($nick,4)
  219. hadd $($+(clonekick,%chane),2) %address.part $replace($removecs($hget($+(clonekick,%chane), %address.part), $nick), $chr(32) $+ $chr(32), $chr(32), $chr(32) $+ $null, $null)
  220. inc %chann
  221. var %chane = $($+($,%chann),2)
  222.  
  223. }
  224. }
  225. }
  226.  
  227. on *:nick:{
  228. if (%CLONEKICK.State == ON) {
  229. var %ncount = 1
  230. while ($gettok($hget(cloneconf,chan),%ncount,32)) {
  231. if ($newnick ison $gettok($hget(cloneconf,chan),%ncount,32)) {
  232. var %address.change = $address($newnick,4)
  233. hadd $+(clonekick,$gettok($hget(cloneconf,chan),%ncount,32)) %address.change $replace($hget($+(clonekick,$gettok($hget(cloneconf,chan),%ncount,32)), %address.change), $nick, $newnick)
  234.  
  235. }
  236. inc %ncount
  237. }
  238. }
  239. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement