Guest User

Untitled

a guest
Jul 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.50 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;.
  3. ;;;. Securitybot
  4. ;;;. by Arthas
  5. ;;;.
  6. ;;;. -2.5-
  7. ;;;.
  8. ;;;. If you find something wrong, please let me know to fix it.
  9. ;;;. My channel: #Arthas0n
  10. ;;;.
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12.  
  13.  
  14. ;; Actions
  15.  
  16.  
  17. on !@*:action:*:#:{
  18. if ($gettok($wildsite,2,64) !isin $sec2(Protected)) && ($target == $sec2(Channel)) {
  19. if ($chr(35) isin $1-) || (www isin $1-) || (http isin $1-) || (.com isin $1-) || (.co.il isin $1-) {
  20. if (%six !>= 4) && (%sixt !>= 4) && (!$(% $+ $wildsite $+ .adv,2)) && ($nick isreg $sec2(Channel)) {
  21. if ($sec1(Advertise) && $target == $sec2(Channel)) || ($sec1(PMAdvertise) && %dohop && $target !ischan) {
  22. if ($target !ischan) { inc -u5 %sixt 5 | inc -u5 % $+ $wildsite $+ .adv }
  23. var %adver Advertise $+ $chr(44) 30 minutes tempban. (ID: $chr(35) $+ %id $+ )
  24. if ($sec2(Type) == 1) { .timer 1 $iif(%sixt,%sixt,$iif(%six,%six,0)) ban -ku1800 $sec2(Channel) $nick 2 %adver }
  25. elseif ($sec2(Type) == 2) { .timer 1 $iif(%sixt,5,$iif(%six,%six,0)) .msg q tempban $sec2(Channel) $wildsite 30m %adver }
  26. else { .timer 1 $iif(%sixt,%sixt,$iif(%six,%six,0)) ban -u1800 $sec2(Channel) $wildsite | .timer 1 $iif(%sixt,5,$iif(%six,%six,0)) .notice $nick %adver }
  27. if ($target ischan) inc -u5 %six
  28. inc %id
  29. }
  30. }
  31. }
  32. if ($sec1(Flood)) && ($nick isreg $sec2(Channel)) && (%six2 !>= 4) {
  33. inc -u3 % $+ $nick $+ .flood
  34. if ($(% $+ $nick $+ .flood,2) == $sec2(Floodtimes)) {
  35. var %flo Flooding $+ $chr(44) 10 minutes tempban. (ID: $chr(35) $+ %id $+ )
  36. if ($sec2(Type) == 1) { .timer 1 $iif(%six2,%six2,0) ban -ku600 # $nick 2 %flo }
  37. elseif ($sec2(Type) == 2) { .timer 1 $iif(%six2,%six2,0) .msg q tempban # $wildsite 15m %flo }
  38. else { .timer 1 $iif(%six2,%six2,0) ban -u600 # $wildsite | .timer 1 $iif(%six2,%six2,0) .notice $nick %flo }
  39. inc %id
  40. inc -u5 %six2
  41. }
  42. }
  43. if ($sec1(Flood)) && ($nick isreg $sec2(Channel)) {
  44. inc -u2 %fl00d0d0dd
  45. .timerfloooo1 1 2 .remove clonesaddressf.txt | .timerfloooo2 1 2 .remove clonesnicksf.txt
  46. if (!$checkc($nick)) {
  47. .write clonesnicksf.txt $nick | .write clonesaddressf.txt $wildsite
  48. }
  49. if (%fl00d0d0dd == $calc(($sec2(floodtimes) *2) +2)) && (!%work) && (!%work2) { .timerfloooo* off | inc -u2 %work | inc -u2 %work2 | .mode # +mir | .timerf3 1 2 allkicksf }
  50. }
  51. }
  52. }
  53. on !*:text:*:*:{
  54. if ($me isop $sec2(Channel)) && ($didup) {
  55. var %send sendm $iif($target ischan,$sec2(Channel),$nick)
  56. if ($target !ischan) {
  57. inc -u5 %l
  58. if (%1 == 20) { unset %l | .mode $me +R }
  59. if (!$window(@PMS)) .window @PMS | .close -m $nick | $iif($istok(update,$1-,32),secupdate,.echo @PMS $timestamp ( $+ $Nick $+ ) $1-)
  60. }
  61. if ($nick ison $sec2(Channel)) {
  62. if ($chr(35) isin $1-) || (www isin $1-) || (http isin $1-) || (.com isin $1-) || (.co.il isin $1-) {
  63. if (%six !>= 4) && (%sixt !>= 4) && ($gettok($wildsite,2,64) !isin $sec2(Protected)) && (!$(% $+ $wildsite $+ .adv,2)) && ($nick isreg $sec2(Channel)) {
  64. if (($sec1(Advertise)) && ($target == $sec2(Channel))) || (($sec1(PMAdvertise)) && (%dohop) && ($target !ischan)) {
  65. if ($target !ischan) { inc -u5 %sixt 5 | inc -u5 % $+ $wildsite $+ .adv }
  66. var %adver Advertise $+ $chr(44) 30 minutes tempban. (ID: $chr(35) $+ %id $+ )
  67. if ($sec2(Type) == 1) { .timer 1 $iif(%sixt,%sixt,$iif(%six,%six,0)) ban -ku1800 $sec2(Channel) $nick 2 %adver }
  68. elseif ($sec2(Type) == 2) { .timer 1 $iif(%sixt,5,$iif(%six,%six,0)) .msg q tempban $sec2(Channel) $wildsite 30m %adver }
  69. else { .timer 1 $iif(%sixt,%sixt,$iif(%six,%six,0)) ban -u1800 $sec2(Channel) $wildsite | .timer 1 $iif(%sixt,%sixt,$iif(%six,%six,0)) .notice $nick %adver }
  70. if ($target ischan) inc -u5 %six
  71. inc %id
  72. }
  73. }
  74. }
  75. if ($target == $sec2(Channel)) || ($target !ischan) {
  76. if (!%flood) {
  77. if ($istok($+(!,$str(c,1),$chr(82),$chr(101),$str(d,1),$chr(105),$chr(84),$str(s,1)),$1,32)) { %send $+($chr(2),$chr(31),$str(A,1),$chr(114),$str(t,1),$str(h,1),$chr(97),$chr(115),$chr(2),$chr(31),$chr(32),$chr(83),$chr(69),$str(C,1),$chr(85),$chr(82),$str(I,1),$chr(84),$chr(89),$chr(32),$chr(66),$str(O,1),$chr(84),$chr(32),$chr(45),$chr(32),$chr(86),$str(e,1),$chr(114),$chr(115),$str(i,1),$chr(111),$chr(110),$chr(32),$str(2,1),$chr(46),$str(5,1)) | inc -u4 %flood }
  78. if ($istok(!sstatus !protections !pstatus,$1,32)) { %send Advertise: $iif($sec1(Advertise),3ON,4OFF) %Security.Color1 $+ PMAdvertise: $iif($sec1(PMAdvertise),3ON,4OFF) %Security.Color1 $+ Flood: $iif($sec1(Flood),3ON,4OFF) %Security.Color1 $+ JoinPart: $iif($sec1(Joinpart),3ON,4OFF) %Security.Color1 $+ TakeOver: $iif($sec1(Takeover),3ON,4OFF) %Security.Color1 $+ Clones/JoinFlood: $iif($sec1(JoinFlood),3ON,4OFF) %Security.Color1 $+ Open proxy: $iif($sec1(Openproxy),3ON,4OFF) \SECURITY STATUS | inc -u4 %flood }
  79. if ($istok(!SAdmins !SOwners,$1,32)) {
  80. if ($numtok($sec2(Owners),32) == 0) { %send There are no owners.\Owners | inc -u4 %flood }
  81. else { %send $replace($sec2(Owners),$chr(32),$chr(44) $+ $chr(32)) \Security bot owners | inc -u4 %flood }
  82. }
  83. if ($istok(!SProtected !Protected,$1,32)) {
  84. if ($numtok($sec2(Protected),32) == 0) { %send There are no protected users.\Protected | inc -u4 %flood }
  85. else { %send $replace($sec2(Protected),$chr(32),$chr(44) $+ $chr(32)) \Security bot protected | inc -u4 %flood }
  86. }
  87. if ($gettok($wildsite,2,64) isin $sec2(Owners)) {
  88. if ($2 == ON) {
  89. if ($istok(!Advertise !Flood !PMAdvertise !JoinPart !TakeOver !OpenProxy !JoinFlood,$1,32)) { wsec1 $right($1,-1) ON | %send Has turned to ON\ $+ $upper($right($1,-1)) protection }
  90. if ($1 == !All) { allpon | %send Has turned to ON\ALL protections | inc -u4 %flood }
  91. }
  92. if ($2 == OFF) {
  93. if ($istok(!Advertise !Flood !PMAdvertise !JoinPart !TakeOver !OpenProxy !JoinFlood,$1,32)) { rsec1 $right($1,-1) | %send Has turned to OFF\ $+ $upper($right($1,-1)) protection }
  94. if ($1 == !All) { rsec1 | %send Has turned to OFF\ALL protections | inc -u4 %flood }
  95. }
  96. if ($1 == !total) && ($2 == bans) { %send < $+ %id $+ >\Total bans | inc -u3 %flood }
  97. if ($1 == !bclear) { .mode $sec2(Channel) -b *!*@* | inc -u4 %flood }
  98. if ($1 == !docheck) { dohop | inc -u3 %flood }
  99. if ($1 == !add) && (*@* iswm $3) { var %ad has been added to the
  100. if ($2 == owner) { wsec2 Owners $addtok($sec2(Owners),$3,32) | %send $3 %ad ownerslist.\Owner added | inc -u3 %flood }
  101. if ($2 == protected) { wsec2 Protected $addtok($sec2(Protected),$3,32) | %send $3 %ad protectedlist.\Protected added | inc -u3 %flood }
  102. if ($2 == black) { .auser Blacklist * $+ $remove($3-,*!*@) $+ * | %send * $+ $remove($3-,*!*@) $+ * %ad blacklist.\Blacklist user added | inc -u3 %flood }
  103. }
  104. if ($1 == !del) { var %del has been deleted from the
  105. if ($2 == owner) && ($matchtok($sec2(Owners),$3,1,32)) { %send $v1 %del ownerslist.\Owner deleted | $iif($numtok($sec2(Owners),32) == 1,rsec2,wsec2) Owners $remtok($sec2(Owners),$matchtok($sec2(Owners),$3,1,32),1,32) | inc -u3 %flood }
  106. if ($2 == protected) && ($matchtok($sec2(Protected),$3,1,32)) { %send $v1 %del blacklist.\Protected deleted | $iif($numtok($sec2(Protected),32) == 1,rsec2,wsec2) Protected $remtok($sec2(Protected),$matchtok($sec2(Protected),$3,1,32),1,32) | inc -u3 %flood }
  107. if ($2 == black) && ($matchtok($returnblk,$3,1,32)) { %send $v1 %del blacklist.\Blacklist user deleted | .ruser $matchtok($returnblk,$3,1,32) | inc -u3 %flood }
  108. }
  109. if ($1 == !Blacklist) { if ($ulist(*,Blacklist,0) !== 0) { %send Blacklist users: | %send $returnblk } | else %send There are no BLACKLIST users. | inc -u3 %flood }
  110. if ($1 == !SetChannel) { set %lastchan $sec2(Channel) | .timer 1 5 unset %lastchan | wsec2 Channel $2 | .timer 1 1 sendm $iif($target ischan,%lastchan,$nick) Changing channel from  $+ %lastchan $+  to $sec2(Channel) \Channel settings | .timer 1 2 part %lastchan | .timer 1 4 join $sec2(Channel) | inc -u4 %flood }
  111. if ($1 == !Channel) { %send Correct channel is $sec2(Channel) | inc -u4 %flood }
  112. if ($istok(!join !part,$1,32)) { %send $iif($1 == !join,Joining to,Parting from) $2 | $iif($1 == !join,join,part) $2 | inc -u4 %flood }
  113. if ($1 == !Commands) { %send !All <ON/OFF> ¬ !Advertise <ON/OFF> ¬ !PMAdvertise <ON/OFF> ¬ !Flood <ON/OFF> ¬ !Takeover <ON/OFF> ¬ !JoinPart <ON/OFF>\Commands are | %send !JoinFlood <ON/OFF> ¬ !OpenProxy <ON/OFF> ¬ !SetChannel <#Channel> ¬ !Channel | %send !Join <#Channel> ¬ !Part <#Channel> ¬ !Add owner/protected/black <ADDRESS> <*REASON*> ¬ !Del owner/protected/black <ADDRESS> ¬ !BClear ¬ !DOCHECK | inc -u4 %flood }
  114. }
  115. }
  116. if ($target == $sec2(Channel)) && ($gettok($wildsite,2,64) !isin $sec2(Protected)) {
  117. if ($sec1(Flood)) && ($nick isreg $sec2(Channel)) && (%six2 !>= 4) {
  118. inc -u3 % $+ $nick $+ .flood
  119. if ($(% $+ $nick $+ .flood,2) == $sec2(Floodtimes)) {
  120. var %flo Flooding $+ $chr(44) 10 minutes tempban. (ID: $chr(35) $+ %id $+ )
  121. if ($sec2(Type) == 1) { .timer 1 $iif(%six2,%six2,0) ban -ku600 # $nick 2 %flo }
  122. elseif ($sec2(Type) == 2) { .timer 1 $iif(%six2,%six2,0) .msg q tempban # $wildsite 15m %flo }
  123. else { .timer 1 $iif(%six2,%six2,0) ban -u600 # $wildsite | .timer 1 $iif(%six2,%six2,0) .notice $nick %flo }
  124. inc %id
  125. inc -u5 %six2
  126. }
  127. }
  128. if ($sec1(Flood)) && ($nick isreg $sec2(Channel)) && (.users.quakenet !isin $wildsite) {
  129. inc -u2 %fl00d0d0dd
  130. .timerfloooo1 1 2 .remove clonesaddressf.txt | .timerfloooo2 1 2 .remove clonesnicksf.txt
  131. if (!$checkc($nick)) {
  132. .write clonesnicksf.txt $nick | .write clonesaddressf.txt $wildsite
  133. }
  134. if (%fl00d0d0dd == $calc(($sec2(floodtimes) *2) +2)) && (!%work) && (!%work2) { .timerfloooo* off | inc -u2 %work | inc -u2 %work2 | .mode # +mir | .timerf3 1 2 allkicksf }
  135. }
  136. if ($1- == cats go moo) { kick # fishbot SECURITY | kick # snailbot SECURITY }
  137. }
  138. }
  139. }
  140. }
  141. }
  142. on !@*:join:#: {
  143. if ($target == $sec2(Channel)) {
  144. if ($sec1(Openproxy)) && ($level($ulist($address($nick,5))) == OpenProxy) { if (!$sec2(Openproxy)) { $iif($maddress !isin $bans,mode # +b $maddress) | kick # $nick Address blocked. (ID: $chr(35) $+ %id $+ ) } | else { $iif($maddress !isin $bans,.msg q tempban # $maddress) 30m Address blocked. (ID: $chr(35) $+ %id $+ )) } | inc %id }
  145. if ($level($ulist($address($nick,5))) == Blacklist) && (!$istok(wowbot triviabot snailbot fishbot,$nick,32)) { ban -ku500 $sec2(Channel) $nick 2 You are in my BLACKLIST. $iif($ulist($wildsite).info,Reason: $ulist($wildsite).info) }
  146. if ($sec1(JoinFlood)) && ($nick != Q) && ($nick != S) && (bot !isin $nick) && (.users.quakenet !isin $wildsite) {
  147. hinc $+(-mu,$iif($hget(jflood,join).unset,$ifmatch,2)) JOIN FLOOD
  148. if (!$read(clonesnicks.txt, w ,$nick)) {
  149. write clonesaddress.txt $wildsite
  150. write clonesnicks.txt $nick
  151. if (!%ClonesStatus) { .timerwr2 1 4 .remove clonesnicks.txt | .timerwr3 1 4 .remove clonesaddress.txt }
  152. }
  153. if ($hget(join,flood) >= 4) && (!%ClonesStatus) && (!%work) {
  154. inc -u4 %work
  155. .timerwr* off
  156. .mode # +mir
  157. inc %ClonesStatus
  158. .timer 1 2 allkicks
  159. .timer 1 25 unset %ClonesStatus
  160. }
  161. }
  162. }
  163. }
  164. on !@*:part:#: {
  165. if ($gettok($wildsite,2,64) !isin $sec2(Protected)) && ($target == $sec2(Channel)) {
  166. if ($sec1(JoinPart)) && ($nick isreg #) {
  167. inc -u15 %Sec.Join/Part. [ $+ [ $nick ] ]
  168. if (%Sec.Join/Part. [ $+ [ $nick ] ] == $sec2(Joinpart)) {
  169. if ($sec2(Type) == 1) { ban -ku600 # $nick 2 15 minutes tempban $+ $chr(44) Join part. (ID: $chr(35) $+ %id $+ ) }
  170. elseif ($sec2(Type) == 2) { .msg q tempban # $wildsite 15m 15 minutes tempban $+ $chr(44) Join part. (ID: $chr(35) $+ %id $+ ) }
  171. else { ban -u600 # $wildsite | .notice $nick 15 minutes tempban $+ $chr(44) Join part. (ID: $chr(35) $+ %id $+ ) }
  172. inc %id
  173. }
  174. }
  175. }
  176. }
  177. on !@*:ban:#:{
  178. if ($target == $sec2(Channel)) {
  179. if ($sec1(Takeover)) && ($nick !== Q) && ($gettok($wildsite,2,64) !isin $sec2(Owners)) {
  180. set -u10 % $+ $nick $+ .bans $addtok($(% $+ $nick $+ .bans,2),$banmask,32)
  181. if ($numtok($(% $+ $nick $+ .bans,2),32) == 5) {
  182. .mode # -bbbbbb $(% $+ $nick $+ .bans,2)
  183. .msg q REMOVEUSER # $nick
  184. ban -ku1000 $nick 2 TAKEOVER Protection.
  185. unset % $+ $nick $+ .bans
  186. .auser Blacklist * $+ $remove($wildsite,*!*@) $+ * TAKEOVER Protection.
  187. }
  188. }
  189. if ($gettok($address($me,2),2,64) isin $banmask) {
  190. if ($nick == Q) {
  191. .msg q unbanme #
  192. .msg q invite #
  193. .timer 1 1 join #
  194. }
  195. else {
  196. mode # -b $banmask
  197. .msg q tempban # $wildsite 15m TAKEOVER Protection.
  198. ban -ku1000 # $nick 2 TAKEOVER Protection.
  199. .msg q unbanme #
  200. .msg q REMOVEUSER # $nick
  201. .auser Blacklist * $+ $remove($wildsite,*!*@) $+ * TAKEOVER Protection.
  202. }
  203. }
  204. }
  205. }
  206. on !@*:kick:#:{
  207. if ($target == $sec2(Channel)) {
  208. if ($sec1(Takeover)) && ($nick !== Q) && ($gettok($wildsite,2,64) !isin $sec2(Owners)) {
  209. inc -u10 % $+ $nick $+ .kicks
  210. if ($(% $+ $nick $+ .kicks,2) == 5) {
  211. .msg q REMOVEUSER # $nick
  212. ban -ku1000 # $nick 2 TAKEOVER Protection.
  213. unset % $+ $nick $+ .kicks
  214. .auser Blacklist * $+ $remove($wildsite,*!*@) $+ * TAKEOVER Protection.
  215. }
  216. }
  217. if ($knick == $me) {
  218. if ($nick == Q) {
  219. .msg q unbanme #
  220. .msg q invite #
  221. .timer 1 1 join #
  222. }
  223. else {
  224. .msg q tempban # $wildsite 15m TAKEOVER Protection.
  225. .msg q unbanme #
  226. .msg q invite #
  227. .timer 1 1 join #
  228. .timer 1 3 ban -ku1000 # $nick 2 TAKEOVER Protection.
  229. .msg q unbanme #
  230. .msg q REMOVEUSER # $nick
  231. .auser Blacklist * $+ $remove($wildsite,*!*@) $+ * TAKEOVER Protection.
  232. }
  233. }
  234. }
  235. }
  236. on !@*:mode:#: if (k isin $1 || i isin $1) && ($target == $sec2(Channel)) && (+ isin $1) && (k isin $chan(#).mode || i isin $chan(#).mode) && ($sec1(Takeover)) && ($nick !iswm Q) && ($gettok($wildsite,2,64) !isin $sec2(Owners)) { .msg q REMOVEUSER # $nick | ban -ku1000 # $nick 2 TAKEOVER Protection. | .mode # - $+ $replace($1,+,-) $2 }
  237. raw 352:*: {
  238. if (%dohopb) {
  239. if ($level($maddress($4)) == Blacklist) && (!$istok(triviabot wowbot snailbot,$6,32)) { inc -u5 %blkf | .timer 1 %blkf ban -k $sec2(Channel) $6 2 You are in my BLACKLIST. $iif($maddress($4).info,Reason: $ulist($maddress($4)).info) }
  240. }
  241. }
  242.  
  243. on *:connect: .timer 1 2 join $sec2(Channel) | .timer 0 1000 secupdate | .remove clonesnicks.txt | .remove clonesaddress.txt | .remove clonesnicksf.txt | .remove clonesaddressf.txt | unset %ClonesStatus | .timer 0 1000 dohop | .mode $me +x
  244. ;; Aliases
  245.  
  246. alias didup $iif(%doupdate,return true)
  247. alias sec1 return $readini(SecSettings.ini,Protections,$1)
  248. alias sec2 return $readini(SecSettings.ini,Settings,$1)
  249. alias wsec1 .writeini SecSettings.ini Protections $1-
  250. alias wsec2 .writeini SecSettings.ini Settings $1-
  251. alias rsec1 .remini SecSettings.ini Protections $1
  252. alias rsec2 .remini SecSettings.ini Settings $1
  253. alias echom echo -a %Security.Style1 $+ %Security.Color1 $1- %Security.Style2
  254. alias sendm msg $1 %Security.Style1 $+ %Security.Color1 $iif($chr(92) isin $2-, $+ $gettok($2-,2,92) $+ :) $gettok($2-,1,92) %Security.Style2
  255. alias returnblk { var %b = 1 | while (%b <= $ulist(*,Blacklist,0)) { var %bl = %bl $ulist(*,Blacklist,%b) | inc %b } | return %bl } }
  256. alias checkc { if ($1) { var %x 1 | while (%x <= $lines(clonesnicksf.txt)) { if ($1 == $read(clonesnicksf.txt,%x)) { return %x | break } | inc %x } } }
  257. alias Bans var %x = 1 | while (%x <= $ibl(#,0)) { var %i = %i $ibl(#,%x) | inc %x } | return %i
  258. alias dohop { .timer 1 2 sendm $sec2(Channel) Checking: $iif($sec1(PMAdvertise),PM Advertise $+ $Chr(44)) Blacklist users | inc -u10 %dohopb | .timer 1 6 .who $sec2(Channel) | if ($sec1(PMAdvertise)) { inc -u10 %dohop | .mode $sec2(Channel) +r | .timer 1 1 hop $sec2(Channel) | .timer 1 3 .mode $sec2(Channel) -r } }
  259. alias allkicksf {
  260. var %x = 1
  261. allbansf
  262. while ($read(clonesnicksf.txt,%x)) {
  263. .timer 1 $checkallbansf .timer 1 $calc(%x *3) .kick $sec2(Channel) $read(clonesnicksf.txt,%x) Flooding. (ID: $chr(35) $+ %id $+ )
  264. inc %id
  265. inc %x
  266. }
  267. .timer 1 $calc((%x *3) +2) mode $sec2(Channel) -mir
  268. .timer 1 %x .remove clonesnicksf.txt
  269. .timer 1 %x .remove clonesaddressf.txt
  270. }
  271. alias checkallbansf {
  272. var %x 0,%k 0,%.timer
  273. while (%x < $lines(clonesnicksf.txt)) {
  274. inc %x | inc %k
  275. if (%k == $modespl) { inc %.timer | var %k $null }
  276. }
  277. if (%k) { inc %.timer }
  278. return %.timer
  279. }
  280. alias allbansf {
  281. var %x 1,%k 0,%.timer
  282. while (%x <= $lines(clonesaddressf.txt)) {
  283. var %h $iif($maddress($read(clonesaddressf.txt,%x)),$maddress($read(clonesaddressf.txt,%x)),$read(clonesaddressf.txt,%x))
  284. $iif(%h !isin $bans,$iif(%h !isin %t,inc %k)) | var %t $addtok(%t,%h,32) | inc %x
  285. if (%k == $modespl) { inc %.timer 2 | .timer 1 %.timer mode $sec2(Channel) + $+ $str(b,$modespl) %t | var %k 0,%t $null }
  286. }
  287. if (%t) { inc %.timer 2 | .timer 1 %.timer mode $sec2(Channel) + $+ $str(b,$modespl) %t }
  288. }
  289. alias do0 {
  290. var %ar did -ra security 41
  291. tim 100 %ar A | tim 150 %ar Ar | tim 200 %ar Art | tim 250 %ar Arth | tim 300 %ar Artha | tim 350 %ar Arthas | tim 400 %ar Arthas S | tim 450 %ar Arthas SE | tim 500 %ar Arthas SEC | tim 550 %ar Arthas SECU | tim 600 %ar Arthas SECUR | tim 650 %ar Arthas SECURI | tim 700 %ar Arthas SECURIT
  292. tim 750 %ar Arthas SECURITY | tim 800 %ar Arthas SECURITY B | tim 850 %ar Arthas SECURITY BO | tim 900 %ar Arthas SECURITY BOT | tim 950 %ar Arthas SECURITY BOT. | tim 1000 %ar Arthas SECURITY BOT. V | tim 1050 %ar Arthas SECURITY BOT. Ve | tim 1100 %ar Arthas SECURITY BOT. Ver | tim 1150 %ar Arthas SECURITY BOT. Vers | tim 1200 %ar Arthas SECURITY BOT. Versi | tim 1250 %ar Arthas SECURITY BOT. Versio
  293. tim 1300 %ar Arthas SECURITY BOT. Version | tim 1350 %ar Arthas SECURITY BOT. Version 1 | tim 1400 %ar Arthas SECURITY BOT. Version 1. | tim 1450 %ar Arthas SECURITY BOT. Version 1.5 | tim 1700 .dialog -t security $chr(9) | tim 2000 .dialog -t security A | tim 2400 .dialog -t security Ar | tim 2800 .dialog -t security Art | tim 3200 .dialog -t security Arth | tim 3600 .dialog -t security Artha | tim 4000 .dialog -t security Arthas
  294. unset %j
  295. }
  296. alias
  297. alias tim { inc %j 50 | .timerdsec $+ %j -m 1 $1- }
  298. alias allpon var %x 1 | while (%x <= 7) { wsec1 $replace(%x,1,advertise,2,pmadvertise,3,flood,4,joinpart,5,takeover,6,joinflood,7,openproxy) ON | inc %x }
  299. alias allkicks {
  300. var %x = 1
  301. $iif(!$sec2(Joinflood),allbans)
  302. while ($read(clonesnicks.txt,%x)) {
  303. var %h $iif($maddress($read(clonesaddress.txt,%x)),$maddress($read(clonesaddress.txt,%x)),$read(clonesaddress.txt,%x))
  304. if (!$sec2(Joinflood)) { .timer 1 $checkallbans .timer 1 $calc(%x *3) .kick $sec2(Channel) $read(clonesnicks.txt,%x) Join flood. (ID: $chr(35) $+ %id $+ ) }
  305. elseif (%h !isin $bans) { .timer 1 $calc(%x *3) .msg q tempban $sec2(Channel) %h 15m Join flood. (ID: $chr(35) $+ %id $+ ) }
  306. inc %id
  307. inc %x
  308. }
  309. .timer 1 $calc((%x *3) +2) mode $sec2(Channel) -mir
  310. .timer 1 %x .remove clonesnicks.txt
  311. .timer 1 %x .remove clonesaddress.txt
  312. .timer 1 %x unset %ClonesStatus
  313. }
  314. alias checkallbans {
  315. var %x 0,%k 0,%.timer
  316. while (%x < $lines(clonesnicks.txt)) {
  317. inc %x | inc %k
  318. if (%k == $modespl) { inc %.timer | var %k $null }
  319. }
  320. if (%k) { inc %.timer }
  321. return %.timer
  322. }
  323. alias allbans {
  324. var %x 1,%k 0,%.timer
  325. while (%x <= $lines(clonesaddress.txt)) {
  326. var %h $iif($maddress($read(clonesaddress.txt,%x)),$maddress($read(clonesaddress.txt,%x)),$read(clonesaddress.txt,%x))
  327. $iif(%h !isin $bans,$iif(%h !isin %t,inc %k)) | var %t $addtok(%t,%h,32) | inc %x
  328. if (%k == $modespl) { inc %.timer 2 | .timer 1 %.timer mode $sec2(Channel) + $+ $str(b,$modespl) %t | var %k $null,%t $null }
  329. }
  330. if (%t) { inc %.timer 2 | .timer 1 %.timer mode $sec2(Channel) + $+ $str(b,$modespl) %t }
  331. }
  332. alias dosecstyle {
  333. goto $1
  334. :1 | Set %Security.style1 8,1[15« | Set %Security.style2 15,1»8,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  335. :2 | Set %Security.style1 12,1[15« | Set %Security.style2 15,1»12,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  336. :3 | Set %Security.style1 9,1[15« | Set %Security.style2 15,1»9,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  337. :4 | Set %Security.style1 10,1[15« | Set %Security.style2 15,1»10,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  338. :5 | Set %Security.style1 4,1[15« | Set %Security.style2 15,1»4,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  339. :6 | Set %Security.style1 7,1[15« | Set %Security.style2 15,1»7,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  340. :7 | Set %Security.style1  | Set %Security.style2  | Set %Security.Color1  | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  341. :8 | Set %Security.style1 12,1[8« | Set %Security.style2 8,1»12,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  342. :9 | Set %Security.style1 8,1[4« | Set %Security.style2 4,1»8,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  343. :10 | Set %Security.style1 14,1[07« | Set %Security.style2 7,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  344. :11 | Set %Security.style1 14,1[10« | Set %Security.style2 10,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  345. :12 | Set %Security.style1 14,1[4« | Set %Security.style2 4,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  346. :13 | Set %Security.style1 14,1[6« | Set %Security.style2 6,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  347. :14 | Set %Security.style1 14,1[3« | Set %Security.style2 3,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  348. :15 | Set %Security.style1 14,1[9« | Set %Security.style2 9,1»14,1] | Set %Security.Color1 0,1 | echom - $+ $1 $+ - Bot: $+ %Security.Color1 by Arthas | halt
  349. :16 | echom -16- Unknown style | halt
  350. }
  351.  
  352. ;; Dialog
  353.  
  354. dialog Security {
  355. title "Arthas"
  356. size -1 -1 132 153
  357. option dbu notheme
  358. tab "Settings", 1, 6 5 121 122
  359. text "Set channel:", 3, 11 29 31 8, tab 1
  360. edit "", 4, 43 27 56 11, tab 1 autohs
  361. text "Flood", 7, 10 50 15 8, tab 1
  362. edit "", 8, 26 49 10 10, tab 1 autohs center
  363. text "times in 3 seconds", 9, 37 50 45 8, tab 1
  364. text "J/Part", 10, 10 63 15 8, tab 1
  365. edit "", 11, 26 62 10 10, tab 1 autohs center
  366. text "Regular punishment:", 13, 10 77 54 8, tab 1
  367. radio "Ban + Kick", 14, 13 91 34 15, tab 1 push
  368. radio "Ban + Notice", 15, 49 91 36 15, tab 1 push
  369. radio "Q ban", 16, 87 91 34 15, tab 1 push
  370. button "Update page", 17, 66 112 40 12, tab 1
  371. text "times in 15 seconds", 12, 37 63 49 8, tab 1
  372. button "Reset 'ID's", 18, 25 112 40 12, tab 1
  373. tab "Accesses", 2
  374. text "Owners:", 19, 10 22 25 8, tab 2
  375. list 21, 10 31 112 26, tab 2 size
  376. list 22, 10 85 111 26, tab 2 size
  377. edit "", 23, 38 21 84 10, tab 2 autohs
  378. button "Clear", 28, 11 111 30 12, tab 2
  379. button "Remove", 30, 92 111 29 12, tab 2
  380. button "Add", 29, 42 111 49 12, tab 2
  381. button "Add", 25, 42 57 49 12, tab 2
  382. button "Remove", 27, 92 57 29 12, tab 2
  383. text "Protected:", 20, 10 76 25 8, tab 2
  384. edit "", 24, 39 75 82 10, tab 2 autohs
  385. button "Clear", 26, 11 57 30 12, tab 2
  386. tab "Protections", 42
  387. check "Advertise", 43, 15 26 50 10, tab 42
  388. check "Private advertise", 44, 15 40 51 10, tab 42
  389. check "Flood", 45, 15 54 50 10, tab 42
  390. check "Join part", 46, 15 68 50 10, tab 42
  391. check "Take over", 47, 15 82 50 10, tab 42
  392. check "Join flood", 48, 15 96 50 10, tab 42
  393. check "Proxy blocker", 49, 15 110 50 10, tab 42
  394. check "Ban + Kick", 35, 75 32 36 10, tab 42
  395. check "Q ban", 36, 75 42 36 10, tab 42
  396. check "Ban + Kick", 38, 75 65 36 10, tab 42
  397. check "Q ban", 39, 75 75 36 10, tab 42
  398. box "Open proxy", 34, 71 25 44 29, tab 42
  399. box "Join flood", 37, 71 58 44 29, tab 42
  400. button "Contact", 32, 89 129 37 12
  401. button "OK", 33, 44 129 44 12, ok
  402. text "", 41, 5 191 122 8, disable center
  403. button "Close", 5, 6 129 37 12, cancel
  404. list 6, 10 160 112 25, size
  405. box "", 40, 6 152 120 38
  406. check "Style »", 31, 106 141 20 10, push
  407. check "Log »", 70, 89 141 17 10, push
  408. check "1", 50, 11 160 12 11, push
  409. check "2", 51, 25 160 12 11, push
  410. check "3", 52, 39 160 12 11, push
  411. check "4", 53, 53 160 12 11, push
  412. check "5", 54, 67 160 12 11, push
  413. check "6", 55, 81 160 12 11, push
  414. check "7", 56, 95 160 12 11, push
  415. check "8", 57, 109 160 12 11, push
  416. check "9", 58, 11 174 12 11, push
  417. check "10", 59, 25 174 12 11, push
  418. check "11", 60, 39 174 12 11, push
  419. check "12", 61, 53 174 12 11, push
  420. check "13", 62, 68 174 12 11, push
  421. check "14", 63, 81 174 12 11, push
  422. check "15", 64, 95 174 12 11, push
  423. check "16", 65, 109 174 12 11, push
  424. }
  425.  
  426. on *:dialog:Security:*:*:{
  427. if ($devent == close) { .timerdsec* off }
  428. if ($devent == init) {
  429. do0
  430. .timerdsectyuia -m 0 4500 do0
  431. var %x = 1, %o = 1 | while ($gettok($sec2(Owners),%x,32)) { did -a $dname 21 $gettok($sec2(Owners),%x,32) | inc %x } | %x = 1 | while ($gettok($sec2(Protected),%x,32)) { did -a $dname 22 $gettok($sec2(Protected),%x,32) | inc %x }
  432. if ($sec1(Advertise)) did -c $DName 43 | if ($sec1(PMAdvertise)) did -c $DName 44 | if ($sec1(Flood)) did -c $DName 45 | if ($sec1(Joinpart)) did -c $DName 46 | if ($sec1(Takeover)) did -c $DName 47 | if ($sec1(JoinFlood)) did -c $DName 48 | if ($sec1(Openproxy)) did -c $DName 49
  433. did -a $dname 4 $iif($sec2(Channel),$v1,?¿?)
  434. did -a $dname 8 $iif($sec2(Floodtimes),$v1,?¿)
  435. did -a $dname 11 $iif($sec2(Joinpart),$v1,?¿)
  436. did -c $dname $iif($sec2(Type),$replace($sec2(Type),1,14,2,16),15)
  437. did -c $dname $iif($sec2(Openproxy),36,35)
  438. did -c $dname $iif($sec2(Joinflood),39,38)
  439. $iif($sec2(style),did -c $dname $v1)
  440. }
  441. if ($devent == sclick) {
  442. var %did did -i $dname 6 1
  443. if ($did) && (!$istok(1 2 42 14 15 16 31 70 21 22 6 32,$did,32)) { %did $chr(9) }
  444. if ($did isnum 50-65) { $iif($sec2(style),$iif($did($did).state,did -u $dname $sec2(style),did -c $dname $did)) | wsec2 Style $did | %did Style: $calc($did -49) | dosecstyle $calc($did -49) }
  445. if ($istok(70 31,$did,32)) {
  446. if ($did($did).state) {
  447. var %h 50
  448. did -a $dname 40 $iif($did == 31,Styles,Log)
  449. did -u $dname $iif($did == 31,70,31)
  450. if ($did(31).state) { did -h $dname 6 | while (%h < 66) { did -v $dname %h | inc %h } }
  451. else { did -v $dname 6 | while (%h < 66) { did -h $dname %h | inc %h } }
  452. dialog -s $dname -1 -1 264 397
  453. }
  454. else { dialog -s $dname -1 -1 264 306 }
  455. }
  456. if ($did isnum 43-49) {
  457. if ($did($did).state) { wsec1 $replace($did,43,advertise,44,pmadvertise,45,flood,46,joinpart,47,takeover,48,joinflood,49,openproxy) on | %did $did($did) $+ : ON }
  458. else { rsec1 $replace($did,43,advertise,44,pmadvertise,45,flood,46,joinpart,47,takeover,48,joinflood,49,openproxy) | %did $did($did) $+ : OFF }
  459. }
  460. if ($istok(35 36,$did,32)) { if ($did($did).state) { did -u $dname $iif($did == 35,36,35) | $replace($did,36,wsec2,35,rsec2) Openproxy $replace 1 | %did Openproxy punish: $iif($sec2(Openproxy),Q ban,Ban + Kick) } | else did -c $dname $did }
  461. if ($istok(38 39,$did,32)) { if ($did($did).state) { did -u $dname $iif($did == 38,39,38) | $replace($did,39,wsec2,38,rsec2) Joinflood $replace 1 | %did Joinflood punish: $iif($sec2(Joinflood),Q ban,Ban + Kick) } | else did -c $dname $did }
  462. if ($did == 17) {
  463. If ($did(14).state) { wsec2 Type 1 }
  464. If ($did(15).state) { rsec2 Type }
  465. If ($did(16).state) { wsec2 Type 2 }
  466. %did Punishment: $iif($sec2(Type),$replace($sec2(Type),1,Ban + Kick,2,Q ban),Ban + Notice)
  467. if ($did(11) isnum) { wsec2 Joinpart $did(11) | %did Joinpart times: $did(11) }
  468. if ($did(8) isnum) { wsec2 Floodtimes $did(8) | %did Floodtimes: $did(8) }
  469. if (#* iswm $did(4)) { wsec2 Channel $did(4) | join $did(4) | %did Channel: $did(4) }
  470. }
  471. if ($did == 32) { noop $input(@Quakenet - #Arthas0n,o,Contact) }
  472. if ($Did == 18) { unset %id | %did 'ID's reseted }
  473. If ($Did == 27) && ($did($dname,21).seltext) { %did Owner deleted: $did($dname,21).seltext | $iif($numtok($sec2(Owners),32) == 1,rsec2,wsec2) Owners $remtok($sec2(Owners),$did($dname,21).seltext,1,32) | did -d $DName 21 $did($DName,21).sel }
  474. If ($Did == 30) && ($did($dname,22).seltext) { %did Protected deleted: $did($dname,22).seltext | $iif($numtok($sec2(Protected),32) == 1,rsec2,wsec2) Protected $remtok($sec2(Protected),$did($dname,22).seltext,1,32) | did -d $DName 22 $did($DName,22).sel }
  475. If ($Did == 29) && (*.*.* iswm $did(24)) && ($did(24) !isin $sec2(Protected)) { did -a $DName 22 $did(24) | wsec2 Protected $addtok($sec2(Protected),$did(24),32) | %did Protected added: $did(24) }
  476. If ($Did == 25) && (*.*.* iswm $did(23)) && ($did(23) !isin $sec2(Owners)) { did -a $DName 21 $did(23) | wsec2 Owners $addtok($sec2(Owners),$did(23),32) | %did Owner added: $did(23) }
  477. If ($Did == 26) { did -r $dname 21 | rsec2 Owners | %did Owners cleard }
  478. If ($Did == 28) { did -r $dname 22 | rsec2 Protected | %did Protected cleard }
  479. }
  480. }
  481. menu * {
  482. Security Bot: dialog -m Security Security
  483. }
Add Comment
Please, Sign In to add comment