Advertisement
Guest User

Untitled

a guest
Jun 28th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.69 KB | None | 0 0
  1. [ fortress.mrc - by exit 2003 © ] - [ dark_exit@hotmail.com - IRC-Hispano (#scripting) ]
  2.      ( No copies ninguna parte de este código / Don´t copy any part of this code)
  3. ; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  4.  
  5. ; - DIALOGS -
  6. dialog Protec {
  7. title fortress 4.2 - Protecciones del Canal $str( ,70) by exit
  8. size -1 -1 293 230
  9. option dbu
  10. icon $scriptdirprotec.ico, 0
  11. tab "Protecciones del canal", 8, 4 3 284 202
  12. list 10, 18 31 258 149, tab 8 extsel
  13. box "", 11, 12 22 270 160, tab 8
  14. combo 43, 13 188 60 50, tab 8 size drop
  15. button "+", 44, 76 188 11 11, tab 8
  16. button "-", 45, 88 188 11 11, tab 8
  17. check "Desactivar todas", 6, 106 186 56 14, tab 8 push
  18. text "Exentos:", 35, 169 189 22 8, tab 8
  19. box "", 42, 164 183 1 17, tab 8
  20. check "Voices", 7, 192 186 30 14, tab 8 push
  21. check "Opers", 5, 222 186 30 14, tab 8 push
  22. check "Halfops", 34, 252 186 30 14, tab 8 push
  23. tab "Propiedades de las protecciones", 13
  24. box "Opciones de antispam", 14, 12 22 79 127, tab 13
  25. edit "", 15, 20 36 28 10, tab 13 autohs
  26. button "+", 16, 48 36 12 10, tab 13
  27. list 18, 20 49 63 93, tab 13 size
  28. button "-", 17, 60 36 12 10, tab 13
  29. button "-", 23, 139 37 12 10, tab 13
  30. button "+", 21, 127 37 12 10, tab 13
  31. edit "", 20, 99 37 28 10, tab 13 autohs
  32. list 22, 99 50 63 93, tab 13 size
  33. box "Palabras prohibidas", 19, 92 22 77 127, tab 13
  34. check "Contador de kicks:", 24, 178 36 55 10, tab 13
  35. text "Tiempo del temp-ban:", 25, 18 179 52 8, tab 13
  36. edit "", 26, 71 178 18 10, tab 13 autohs center
  37. text "Mascara del ban", 46, 18 163 42 8, tab 13
  38. combo 47, 64 161 203 80, tab 13 size drop
  39. box "", 48, 12 147 268 51, tab 13
  40. edit "", 49, 233 36 19 10, tab 13 read autohs center
  41. text "Reestablecer a", 50, 178 50 39 8, tab 13
  42. edit "", 51, 217 49 35 10, tab 13 autohs center
  43. button "Ok", 52, 254 49 21 11, tab 13
  44. box "kicks config", 53, 170 22 110 64, tab 13
  45. check "Usar siempre kick aleatorio", 54, 178 67 75 10, tab 13
  46. button "txt", 55, 254 67 21 11, tab 13
  47. box "", 62, 170 116 110 33, tab 13
  48. text "Tiempo del temp-ignore:", 63, 178 131 58 8, tab 13
  49. edit "", 64, 236 130 13 10, tab 13 autohs center
  50. text "segundos.", 65, 250 131 25 8, tab 13
  51. text "segundos.", 66, 90 179 25 8, tab 13
  52. text "kicks", 2, 255 37 15 8, tab 13
  53. edit "", 30, 178 100 94 10, tab 13 autohs
  54. button "?", 32, 151 37 12 10, tab 13
  55. button "?", 28, 72 36 12 10, tab 13
  56. check "Poner logo", 33, 233 182 37 10, tab 13
  57. box "Kick por defecto", 1, 170 87 110 31, tab 13
  58. button "Ok", 9, 225 211 56 14, ok
  59. text "Protecciones del canal ", 27, 58 211 116 8, disable center
  60. text "fortress 4.2", 29, 58 219 116 8, disable center
  61. }
  62.  
  63. dialog editprot {
  64. title "fortress - Editor de Protecciones"
  65. size -1 -1 157 154
  66. option dbu
  67. box "Trigger", 4, 7 41 77 27
  68. edit "", 6, 12 51 16 10, autohs center
  69. text "veces en", 7, 29 52 24 8
  70. edit "", 8, 52 51 16 10, autohs center
  71. button "&Guardar configuraciones", 9, 4 132 98 15, ok
  72. text "seg.", 12, 69 52 11 8
  73. button "&Cancelar", 16, 103 132 49 15, cancel
  74. box "Castigo", 10, 87 41 61 74
  75. box "", 22, -7 -3 182 128
  76. check "", 3, 48 21 92 9
  77. box "", 1, 7 7 33 33
  78. icon 14, 15 15 18 16, $scriptdirProtec.ico, 0
  79. box "", 15, 40 7 108 33
  80. text "", 5, 72 185 1 1, hide
  81. text "Formato 2", 24, 30 52 50 8, hide
  82. text "No trigger para esta opción", 25, 12 53 67 8, disable
  83. list 11, 92 71 51 40, size
  84. text "Texto de castigo", 17, 17 73 42 8
  85. edit "", 18, 12 81 68 10, autohs
  86. button "+", 19, 92 62 11 8
  87. button "-", 20, 102 62 11 8
  88. button "up", 21, 112 62 15 8
  89. button "down", 26, 126 62 17 8
  90. text "Texto de aviso", 27, 17 93 42 7
  91. text "", 999, 500 500 0 0, hide
  92. edit "", 28, 12 100 68 10, autohs
  93. box "", 29, 8 67 76 48
  94. combo 30, 92 50 51 83, size drop
  95. check "Todos", 81, 8 43 24 10, hide
  96. check "+l si es mayor o igual a", 82, 8 55 65 10, hide
  97. check "otros", 83, 34 43 22 10, hide
  98. edit "", 84, 56 43 17 10, hide autohs
  99. button "?", 85, 73 43 10 10, hide
  100. edit "", 86, 72 55 12 10, hide autohs center
  101. }
  102.  
  103. dialog protecH {
  104. title "fortress - Ayuda"
  105. size -1 -1 181 93
  106. option dbu
  107. box "", 12, 8 6 29 28
  108. box "", 2, 1 -1 179 93
  109. icon 13, 14 13 17 16, $scriptdirmirc.ico, 0
  110. text "", 1, 43 10 131 8
  111. text "", 3, 43 17 131 8
  112. text "", 4, 43 24 131 8
  113. text "", 5, 43 38 131 8
  114. text "", 6, 43 45 131 8
  115. text "", 7, 43 52 131 8
  116. text "", 8, 43 59 131 8
  117. text "", 9, 43 66 131 8
  118. text "fortress", 14, 8 37 25 8, disable right hide
  119. text "noticias", 15, 10 43 25 8, disable center hide
  120. text "", 16, 43 73 131 8
  121. text "", 17, 43 80 131 8
  122. text " ", 10, 43 31 131 8
  123. }
  124.  
  125. ; - ALIASES -
  126. alias -l checkprotini2 {
  127. if (!$exists($scriptdircanales\ $+ # $+ .ini)) return $scriptdirprotec.ini
  128. else return $scriptdircanales\ $+ # $+ .ini
  129. }
  130. alias -l mode+L {
  131. var %mode $1-
  132. :left
  133. if ($left(%mode,1) !isnum) { var %mode = $remove(%mode,$left(%mode,1)) | goto left }
  134. :right
  135. if ($right(%mode,1) !isnum) { var %mode = $remove(%mode,$right(%mode,1)) | goto right }
  136. return %mode
  137. }
  138. alias -l modeOtros {
  139. var %_tmp3 $remove($1-,$chr(32),+,l,o,v)
  140. if (%_tmp3) {
  141. var %_tmp2 $len(%_tmp3)
  142. while (%_tmp2) {
  143. if ($mid(%_tmp3,%_tmp2,1) isin $readp(Proteger_Modos,otroslist)) var %return 1
  144. dec %_tmp2
  145. }
  146. }
  147. else { return $false }
  148. if (%return) return $true
  149. else return $false
  150. }
  151. alias -l Mayusnum {
  152. set %len $len($remove($1-,$chr(32)))
  153. while (%len) {
  154. set %upper $mid($remove($1-,$chr(32)),%len,1)
  155. if ($isupper(%upper) == $true) && (%upper isalpha) { inc %Mayus }
  156. dec %len
  157. }
  158. var %return %Mayus
  159. unset %upper , %len , %Mayus
  160. return %return
  161. }
  162. alias -l Colornum {
  163. set %protcol $remove($1-,,,,)
  164. set %protcol.num $numtok(%protcol,3)
  165. var %return $calc(%protcol.num - 1)
  166. unset %protco*
  167. return %return
  168. }
  169. alias -l find.protecs {
  170. var %max $findfile($scriptdircanales,*.ini,0)
  171. while (%max) {
  172. did -a protec 43 $remove($nopath($findfile($scriptdircanales,*.ini,%max)),.ini)
  173. dec %max
  174. }
  175. }
  176.  
  177. alias -l readp {
  178. if ($dialog(protec)) {
  179. var %tmp5 $iif(($did(protec,43).seltext == Global),$scriptdirProtec.ini, $scriptdircanales\ $+ $did(protec,43).seltext $+ .ini))
  180. return $remove($readini(%tmp5,$1,$2-),$chr(160))
  181. }
  182. else {
  183. var %tmp5 $iif(($exists($scriptdircanales\ $+ $chan $+ .ini) != $true),$scriptdirProtec.ini, $scriptdircanales\ $+ $chan $+ .ini))
  184. return $remove($readini(%tmp5,$1,$2-),$chr(160))
  185. }
  186. }
  187.  
  188.  
  189. alias -l protlog return 1fortress(4.2) 5
  190. alias -l inccount { writeini $scriptdirProtec.ini setup countnum $calc($readini($scriptdirProtec.ini,setup,countnum) + 1) }
  191. alias -l dll.views { return $scriptdirmdx\views.mdx }
  192. alias -l dll.mdx { return $scriptdirmdx\mdx.dll }
  193. alias -l set.mdx.init { dll $dll.mdx SetMircVersion $version | dll $dll.mdx MarkDialog $dname }
  194. alias -l protechelp dialog $iif($dialog(protech),-ve,-m protech) protech
  195. alias -l editprot dialog $iif($dialog(editprot),-ve,-m editprot) editprot
  196. alias fortress dialog $iif($dialog(protec),-ve,-m protec) protec
  197. alias -l pEncode return $replace($1-,,±B›,,±K›,,±U›,,±O›)
  198. alias -l pDecode return $replace($1-,±B›,,±O›,,±K›,,±U›,)
  199. alias -l checkprotini return $iif(($did(protec,43).seltext == Global),$scriptdirProtec.ini, $scriptdircanales\ $+ $did(protec,43).seltext $+ .ini))
  200. alias -l readp return $readini($scriptdirprotec.ini,$1,$2-)
  201. alias -l protinit {
  202. ; did -o protec 10 2 2 2 2 2 Tipo $chr(9) Num $chr(9) Seg $chr(9) Castigo $chr(9) Texto castigo
  203. did -o protec 10 3 2 2 2 $iif($readp(Flood_lineas,state) == 1,2,1) Flood de líneas $chr(9) $remove($readp(Flood_lineas,Num),$chr(160)) $chr(9) $remove($readp(Flood_lineas,Seg),$chr(160)) $chr(9) $remove($readp(Flood_lineas,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_lineas,Text),$chr(160)))
  204. did -o protec 10 4 2 2 2 $iif($readp(Flood_caract,state) == 1,2,1) Flood de caracteres $chr(9) $remove($readp(Flood_caract,Num),$chr(160)) $chr(9) $remove($readp(Flood_caract,Seg),$chr(160)) $chr(9) $remove($readp(Flood_caract,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_caract,Text),$chr(160)))
  205. did -o protec 10 5 2 2 2 $iif($readp(Flood_repet,state) == 1,2,1) Flood de repeticiones $chr(9) $remove($readp(Flood_repet,Num),$chr(160)) $chr(9) $remove($readp(Flood_repet,Seg),$chr(160)) $chr(9) $remove($readp(Flood_repet,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_repet,Text),$chr(160)))
  206. did -o protec 10 6 2 2 2 $iif($readp(Flood_acciones_lineas,state) == 1,2,1) Flood de acciones/linea $chr(9) $remove($readp(Flood_acciones_lineas,Num),$chr(160)) $chr(9) $remove($readp(Flood_acciones_lineas,Seg),$chr(160)) $chr(9) $remove($readp(Flood_acciones_lineas,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_acciones_lineas,Text),$chr(160)))
  207. did -o protec 10 7 2 2 2 $iif($readp(Flood_Acciones_caract,state) == 1,2,1) Flood de acciones/caract. $chr(9) $remove($readp(Flood_Acciones_caract,Num),$chr(160)) $chr(9) $remove($readp(Flood_Acciones_caract,Seg),$chr(160)) $chr(9) $remove($readp(Flood_Acciones_caract,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_Acciones_caract,Text),$chr(160)))
  208. did -o protec 10 8 2 2 2 $iif($readp(Flood_notices_lineas,state) == 1,2,1) Flood de notices/linea $chr(9) $remove($readp(Flood_notices_lineas,Num),$chr(160)) $chr(9) $remove($readp(Flood_notices_lineas,Seg),$chr(160)) $chr(9) $remove($readp(Flood_notices_lineas,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_notices_lineas,Text),$chr(160)))
  209. did -o protec 10 9 2 2 2 $iif($readp(Flood_notices_caract,state) == 1,2,1) Flood de notices/caract. $chr(9) $remove($readp(Flood_notices_caract,Num),$chr(160)) $chr(9) $remove($readp(Flood_notices_caract,Seg),$chr(160)) $chr(9) $remove($readp(Flood_notices_caract,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_notices_caract,Text),$chr(160)))
  210. did -o protec 10 10 2 2 2 $iif($readp(Flood_Join,state) == 1,2,1) Flood de join $chr(9) $remove($readp(Flood_Join,Num),$chr(160)) $chr(9) $remove($readp(Flood_Join,Seg),$chr(160)) $chr(9) $remove($readp(Flood_Join,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_Join,Text),$chr(160)))
  211. did -o protec 10 11 2 2 2 $iif($readp(Flood_CTCPs,state) == 1,2,1) Flood de CTCP´s $chr(9) $remove($readp(Flood_CTCPs,Num),$chr(160)) $chr(9) $remove($readp(Flood_CTCPs,Seg),$chr(160)) $chr(9) $remove($readp(Flood_CTCPs,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Flood_CTCPs,Text),$chr(160)))
  212. did -o protec 10 12 2 2 2 $iif($readp(Topic,state) == 1,2,1) Flood de topic $chr(9) $remove($readp(Topic,Num),$chr(160)) $chr(9) $remove($readp(Topic,Seg),$chr(160)) $chr(9) $remove($readp(Topic,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Topic,Text),$chr(160)))
  213.  
  214. did -o protec 10 13 2 2 2 1 $chr(9) $chr(9) $chr(9) $chr(9)
  215.  
  216. did -o protec 10 14 2 2 2 $iif($readp(Exceso_mayúsculas,state) == 1,2,1) Exceso de mayúsculas $chr(9) $remove($readp(Exceso_mayúsculas,Num),$chr(160)) $chr(9) $remove($readp(Exceso_mayúsculas,Seg),$chr(160)) $chr(9) $remove($readp(Exceso_mayúsculas,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Exceso_mayúsculas,Text),$chr(160)))
  217. did -o protec 10 15 2 2 2 $iif($readp(Exceso_colores,state) == 1,2,1) Exceso de colores $chr(9) $remove($readp(Exceso_colores,Num),$chr(160)) $chr(9) $remove($readp(Exceso_colores,Seg),$chr(160)) $chr(9) $remove($readp(Exceso_colores,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Exceso_colores,Text),$chr(160)))
  218. did -o protec 10 16 2 2 2 $iif($readp(Proteger_Modos,state) == 1,2,1) Proteger modos $chr(9) $remove($readp(Proteger_Modos,Num),$chr(160)) $chr(9) $remove($readp(Proteger_Modos,Seg),$chr(160)) $chr(9) $remove($readp(Proteger_Modos,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Proteger_Modos,Text),$chr(160)))
  219. did -o protec 10 17 2 2 2 $iif($readp(Palabras_prohibidas,state) == 1,2,1) Palabras prohibidas $chr(9) $remove($readp(Palabras_prohibidas,Num),$chr(160)) $chr(9) $remove($readp(Palabras_prohibidas,Seg),$chr(160)) $chr(9) $remove($readp(Palabras_prohibidas,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Palabras_prohibidas,Text),$chr(160)))
  220. did -o protec 10 18 2 2 2 $iif($readp(Antispam,state) == 1,2,1) Antispam $chr(9) $remove($readp(Antispam,Num),$chr(160)) $chr(9) $remove($readp(Antispam,Seg),$chr(160)) $chr(9) $remove($readp(Antispam,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Antispam,Text),$chr(160)))
  221.  
  222. did -o protec 10 19 2 2 2 1 $chr(9) $chr(9) $chr(9) $chr(9)
  223.  
  224. did -o protec 10 20 2 2 2 $iif($readp(Massdeop,state) == 1,2,1) Massdeop $chr(9) $remove($readp(Massdeop,Num),$chr(160)) $chr(9) $remove($readp(Massdeop,Seg),$chr(160)) $chr(9) $remove($readp(Massdeop,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Massdeop,Text),$chr(160)))
  225. did -o protec 10 21 2 2 2 $iif($readp(Masskick,state) == 1,2,1) Masskick $chr(9) $remove($readp(Masskick,Num),$chr(160)) $chr(9) $remove($readp(Masskick,Seg),$chr(160)) $chr(9) $remove($readp(Masskick,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Masskick,Text),$chr(160)))
  226. did -o protec 10 22 2 2 2 $iif($readp(Massban,state) == 1,2,1) Massban $chr(9) $remove($readp(Massban,Num),$chr(160)) $chr(9) $remove($readp(Massban,Seg),$chr(160)) $chr(9) $remove($readp(Massban,Action),$chr(160)) $chr(9) $pDecode($remove($readp(Massban,Text),$chr(160)))
  227.  
  228. did $iif($readp(setup,state) == 1,-e,-b) $dname 10
  229.  
  230. did $iif($readp(setup,state) == 1,-u,-c) $dname 6
  231. did $iif($readp(setup,voices) == 1,-c,-u) $dname 7
  232. did $iif($readp(setup,op) == 1,-c,-u) $dname 5
  233. did $iif($readp(setup,hop) == 1,-c,-u) $dname 34
  234.  
  235. did -r $dname 18,22
  236. did $iif(($did(protec,43).seltext != Global),-b,-e) $dname 51,52,30
  237. did -ra $dname 26 $readp(setup,tempban)
  238. did -ra $dname 64 $readp(setup,tempignore)
  239. did -c $dname 47 $readp(setup,maskban)
  240.  
  241. did $iif(($readp(setup,protlog) == 1),-c,-u) $dname 33
  242.  
  243. var %max $ini($checkprotini,antispamwords,0)
  244. var %min 1
  245. while (%min <= %max) {
  246. did -a $dname 18 $ini($checkprotini,antispamwords,%min)
  247. inc %min
  248. }
  249. var %max $ini($checkprotini,Banwords,0)
  250. var %min 1
  251. while (%min <= %max) {
  252. did -a $dname 22 $ini($checkprotini,Banwords,%min)
  253. inc %min
  254. }
  255. did -ra $dname 30 $readp(Default_kick,txt)
  256. did $iif(($readp(Random_kick,state) == 1),-c,-u) $dname 54
  257.  
  258. }
  259. alias -l protecCheckedit {
  260. if ($did($dname,$did).text !isnum) {
  261. var %length.num $len($did($dname,$did).text)
  262. var %num $did($dname,$did).text
  263. var %length.num $calc(%length.num - 1)
  264. did -r $dname $did
  265. did -ra $dname $did $left(%num,%length.num)
  266. }
  267. }
  268. alias -l ProtecClose { writeini $checkprotini $1 state $iif(($gettok($did(protec,10,$2),5,32) == 2),1,0) }
  269. alias -l protcast {
  270. set %prot.lines $did(editprot,11).lines
  271. var %min 1
  272. while (%min <= %prot.lines) {
  273. set %prot.return %prot.return $did(editprot,11,%min)
  274. inc %min
  275. }
  276. var %return %prot.return
  277. unset %prot.*
  278. return %return
  279. }
  280. alias -l protecEscritura {
  281. set %x.num $numtok($2-,$iif(($1 == Bold),2))
  282. set %x.min 1
  283. set %x.total
  284. while (%x.min <= %x.num) {
  285. if (%x.min != 1) && (%x.min != 3) && (%x.min != 5) && (%x.min != 7) && (%x.min != 9) {
  286. set %x.total $calc(%x.total + $len($gettok($1-,%x.min,2)))
  287. }
  288. inc %x.min
  289. }
  290. var %return %x.total
  291. unset %x.*
  292. return %return
  293. }
  294.  
  295. ; - REMOTES EVENTOS DEL DIALOG -
  296. on *:dialog:protec:sclick:32: {
  297. protechelp
  298. did -ra protecH 1 Configura las palabras que serán consideradas como
  299. did -ra protecH 3 'prohibidas' en el canal.
  300. did -ra protecH 4 Ocurre exactamente igual que con la opción de antis-
  301. did -ra protecH 10 pam, al añadir una palabra entre asteriscos significa
  302. did -ra protecH 5 que la considerará cuando esté contenida en la frase,
  303. did -ra protecH 6 y si no está entre dos asteriscos pues que únicamente
  304. did -ra protecH 7 la frase debe de ser esa palabra.
  305. did -ra protecH 9 Es importante diferenciar este matiz, ya que puede oca-
  306. did -ra protecH 16 sionar confusión entre los usuarios que la configuran.
  307. }
  308. on *:dialog:protec:sclick:28: {
  309. protechelp
  310. did -ra protecH 1 Configura las palabras o frases que serán consideradas
  311. did -ra protecH 3 como publicidad no permitida.
  312. did -ra protecH 4 Al añadir por ejemplo *joder* a la lista significaría que
  313. did -ra protecH 5 tenida en la frase.
  314. did -ra protecH 6 Sin embargo si se añadiese a la lista la palabra joder
  315. did -ra protecH 7 sin asteriscos a ambos lados significaría que reconoce-
  316. did -ra protecH 8 ria el spam solamente si la frase completa fuese (joder)
  317. did -ra protecH 9 Por ej: - Vete de aqui joder
  318. did -ra protecH 16 En este caso no sería reconocida.
  319. did -ra protecH 10 reconocería el spam si la palabra (joder) estuviese con-
  320. }
  321. on *:dialog:editprot:sclick:85: {
  322. protechelp
  323. did -ra protecH 1 Configura los modos que serán protegidos cuando
  324. did -ra protecH 3 se efectúe el cambio. Para que funcione correctamente
  325. did -ra protecH 4 deben de ir separados por espacios.
  326. did -ra protecH 5 Los modos comunes que tienen la mayor parte de los
  327. did -ra protecH 6 servidores son +k +s +n +t +l
  328. did -ra protecH 7 No obstante algunos servidores incluyen otros, infórma-
  329. did -ra protecH 8 te de cuales son los de te servidor favorito para poder
  330. did -ra protecH 9 configurar esta opción más ampliamente.
  331. }
  332. on *:dialog:Protec:init:*: {
  333. .set.mdx.init
  334. dll $dll.mdx SetControlMDX $dname 10,1 listview checkboxes rowselect single showsel report nosortheader > $dll.views
  335. dll $dll.mdx SetFont $dname 10,43,44,45,6,35,7,5,34,27,29,14,19,15,16,17,18,28,20,21,22,23,32,53,24,49,2,50,51,52,54,55,30,63,64,65,46,47,25,26,66,33,9 Delta 13 500 tahoma
  336. dll $dll.mdx SetBorderStyle $dname 6,7,5,9,16,34,17,21,28,32,23,44,45,10,18,22,52,55,59,61,60 staticedge
  337. did -ra $dname 43 Global | did -c $dname 43 1
  338. did -i $dname 10 1 headerdims 172 40 40 150 400
  339. ; did -i $dname 1 1 headerdims 182 40 40 150 400
  340. did -i $dname 10 1 headertext Tipo de protección $chr(9) $+ Núm. $chr(9) $+ Seg. $chr(9) $+ Castigo o acción $chr(9) $+ Texto de castigo
  341. didtok $dname 47 32 *!fortress@virtual.host *!*fortress@virtual.host *!*@virtual.host *!*fortress@*.host *!*@*.host nick!fortress@virtual.host nick!*fortress@virtual.host nick!*@virtual.host nick!*fortress@*.host nick!*@*.host
  342. if ($readp(setup,countstate) == 1) { did -c $dname 24 }
  343. did -ra $dname 49 $readp(setup,countnum)
  344. protinit | find.protecs
  345. }
  346. on *:dialog:Protec:dclick:10: {
  347. if (!$dialog(editprot)) {
  348. if ($did($dname,10).sel != 12) && ($did($dname,10).sel != 18) {
  349. editprot
  350. did -ra editprot 5 $did(protec,10).sel
  351. did -ra editprot 999 10
  352. $iif(($gettok($did(protec,10).seltext,5,32) == 2),did -c editprot 3)
  353. did -ra editprot 3 $mid($gettok($did(protec,10,$did(protec,10).sel),1,9),13,60) | did -h editprot 24,25
  354. var %num $remove($remove($mid($gettok($did(protec,10,$did(protec,10).sel),2,9),10,60),$chr(32)),$chr(160))
  355. if (%num != $chr(45)) { did -vra editprot 6 %num }
  356. else { did -vra editprot 6 - | did -b editprot 6 }
  357. var %seg $remove($remove($mid($gettok($did(protec,10,$did(protec,10).sel),3,9),10,60),$chr(32)),$chr(160))
  358. if (%seg != $chr(45)) { did -vra editprot 8 %seg }
  359. else { did -vra editprot 8 - | did -b editprot 8 }
  360. if ($did($dname,$did).sel == 3) || ($did($dname,$did).sel == 6) || ($did($dname,$did).sel == 8) || ($did($dname,$did).sel == 13) || ($did($dname,$did).sel == 14) { did -v editprot 24 | did -h editprot 25,7,8,12 }
  361. if ($did($dname,$did).sel == 3) || ($did($dname,$did).sel == 6) || ($did($dname,$did).sel == 8) { did -ra editprot 24 caractéres por linea }
  362. if ($did($dname,$did).sel == 13) { did -ra editprot 24 mayúsculas por línea }
  363. if ($did($dname,$did).sel == 14) { did -ra editprot 24 colores por línea }
  364. if ($did($dname,$did).sel == 16) || ($did($dname,$did).sel == 17) { did -h editprot 6,7,8,12 | did -v editprot 25 }
  365. if ($did($dname,$did).sel == 15) { did -v editprot 81,82,83,84,85,86 | did -h editprot 6,7,8,12,25,4 }
  366. var %chars32 $numtok($remove($mid($gettok($did(protec,10,$did(protec,10).sel),4,9),10,60),$chr(160)),32) | var %min 1
  367. while (%min <= %chars32) { did -a editprot 11 $gettok($remove($mid($gettok($did(protec,10,$did(protec,10).sel),4,9),10,60),$chr(160)),%min,32) | inc %min }
  368. if ($remove($mid($gettok($did(protec,10,$did(protec,10).sel),5,9),10,400),$chr(160))) did -ra editprot 18 $ifmatch
  369.  
  370. if (Aviso isin $readp($ini($checkprotini,$did(protec,10).sel),action)) { did -v editprot 28,27 | did -ra editprot 28 $remove($readp($ini($checkprotini,$did(protec,10).sel),aviso),$chr(160)) }
  371. else { did -b editprot 28,27 }
  372. if ($readp(proteger_modos,Todos) == 1) did -c editprot 81
  373. if ($readp(proteger_modos,Limited) == 1) { did -c editprot 82 | did -e editprot 86 }
  374. else { did -b editprot 86 }
  375. did -ra editprot 86 $readp(proteger_modos,Limitnum)
  376. if ($readp(proteger_modos,Otros) == 1) { did -c editprot 83 | did -e editprot 84 }
  377. else { did -b editprot 84 }
  378. did -ra editprot 84 $readp(proteger_modos,Otroslist)
  379. }
  380. }
  381. else dialog -v editprot
  382. }
  383. on *:dialog:protec:edit:*: {
  384. if ($did != 15) && ($did != 20) && ($did != 30) protecCheckedit
  385. if ($did == 64) { if ($did($dname,$did)) writeini $checkprotini setup tempignore $did($dname,$did) }
  386. if ($did == 26) { if ($did($dname,$did)) writeini $checkprotini setup tempban $did($dname,$did) }
  387. if ($did == 30) { if ($did($dname,$did)) writeini $checkprotini Default_kick txt $did($dname,$did) }
  388. }
  389. on *:dialog:editprot:edit:*: {
  390. if ($did == 6) || ($did == 8) protecCheckedit
  391. if ($did == 86) writeini $checkprotini proteger_modos limitnum $iif(($did($dname,$did)),$ifmatch,1)
  392. if ($did == 84) writeini $checkprotini proteger_modos Otroslist $did($dname,$did)
  393.  
  394. }
  395. on *:dialog:editprot:sclick:30: {
  396. if ($did($dname,$did).sel == 7) { did -c $dname $did 10 }
  397. }
  398. on *:dialog:editprot:sclick:9: {
  399. if ($dialog(protec)) {
  400. did -o protec $did($dname,999) $did(editprot,5).text 2 + 2 2 $iif(($did(editprot,3).state == 1),2,1) $did(editprot,3).text $chr(9) $did(editprot,6).text $chr(9) $did(editprot,8).text $chr(9) $protcast $chr(9) $iif($did(editprot,18).text,$did(editprot,18).text,<default>)
  401. if $did($dname,6) { writeini $checkprotini $ini($checkprotini,$did($dname,5)) num $chr(160) $+ $did(editprot,6).text }
  402. if $did($dname,8) { writeini $checkprotini $ini($checkprotini,$did($dname,5)) seg $chr(160) $+ $did(editprot,8).text }
  403. writeini $checkprotini $ini($checkprotini,$did($dname,5)) Action $protcast
  404. writeini $checkprotini $ini($checkprotini,$did($dname,5)) State $iif(($did($dname,3) == 1),1,0)
  405. writeini $checkprotini $ini($checkprotini,$did($dname,5)) Text $PEncode($iif($did(editprot,18).text,$ifmatch,<default>))
  406. if ($did($dname,28)) writeini $checkprotini $ini($checkprotini,$did($dname,5)) Aviso $PEncode($did($dname,28))
  407. did -c protec $did($dname,999) $did($dname,5)
  408. }
  409. }
  410. on *:dialog:editprot:init:*: {
  411. .set.mdx.init
  412. dll $dll.mdx SetFont $dname 3,25,24,7,6,8,12,17,27,9,30,16,19,20,21,26,11,28,18,81,82,83,84,86 Delta 13 500 tahoma
  413. dll $dll.mdx SetBorderStyle $dname 9,16,85,19,20,21,26 staticedge
  414. didtok editprot 30 32 aviso kick kickban kicktempban ban tempban - ignore tempignore $chr(160)
  415. }
  416. on *:dialog:editprot:sclick:9: {
  417. if ($did(editprot,3).text) {
  418. var %prot $ifmatch
  419. if ($did(editprot,3).text == Lineas máximas) { Saveprot Prot1 | protchange %prot }
  420. elseif ($did(editprot,3).text == Lineas repetidas) { Saveprot Prot2 | protchange %prot }
  421. elseif ($did(editprot,3).text == Flood de CTCPs) { Saveprot Prot3 | protchange %prot }
  422. elseif ($did(editprot,3).text == Flood de acciones) { Saveprot Prot4 | protchange %prot }
  423. elseif ($did(editprot,3).text == Flood de notices) { Saveprot Prot5 | protchange %prot }
  424. elseif ($did(editprot,3).text == Flood de Join) { Saveprot Prot6 | protchange %prot }
  425. elseif ($did(editprot,3).text == Flood de nick) { Saveprot Prot7 | protchange %prot }
  426. elseif ($did(editprot,3).text == Exceso de mayúsculas) { Saveprot Prot8 | protchange %prot }
  427. elseif ($did(editprot,3).text == Exceso de colores) { Saveprot Prot9 | protchange %prot }
  428. elseif ($did(editprot,3).text == Exceso caractéres) { Saveprot Prot10 | protchange %prot }
  429. elseif ($did(editprot,3).text == Massdeop) { Saveprot Prot11 | protchange %prot }
  430. elseif ($did(editprot,3).text == Masskick) { Saveprot Prot12 | protchange %prot }
  431. elseif ($did(editprot,3).text == Massban) { Saveprot Prot13 | protchange %prot }
  432. elseif ($did(editprot,3).text == Palabras prohibidas) { Saveprot Prot14 | protchange %prot }
  433. elseif ($did(editprot,3).text == Antispam) { Saveprot Prot15 | protchange %prot }
  434. elseif ($did(editprot,3).text == Random kick) { protchange %prot }
  435. }
  436. }
  437. on *:dialog:protec:close:*: {
  438. ProtecClose.check
  439. }
  440. on *:dialog:protec:sclick:6: {
  441. ; echo -s writeini $checkprotini setup state $did($dname,$did).state
  442. if ($did($dname,$did).state == 1) { did -b $dname 10 | writeini $checkprotini setup state 0 }
  443. if ($did($dname,$did).state == 0) { did -e $dname 10 | writeini $checkprotini setup state 1 }
  444. }
  445. on *:dialog:protec:sclick:7: {
  446. if ($did($dname,$did).state == 1) { writeini $checkprotini setup voices 1 }
  447. if ($did($dname,$did).state == 0) { writeini $checkprotini setup voices 0 }
  448. }
  449. on *:dialog:protec:sclick:5: {
  450. if ($did($dname,$did).state == 1) { writeini $checkprotini setup op 1 }
  451. if ($did($dname,$did).state == 0) { writeini $checkprotini setup op 0 }
  452. }
  453. on *:dialog:protec:sclick:34: {
  454. if ($did($dname,$did).state == 1) { writeini $checkprotini setup hop 1 }
  455. if ($did($dname,$did).state == 0) { writeini $checkprotini setup hop 0 }
  456. }
  457. on *:dialog:protec:sclick:47: { writeini $checkprotini setup maskban $did($dname,$did).sel }
  458. on *:dialog:protec:sclick:24: { writeini $checkprotini setup countstate $iif(($did($dname,$did).state == 1),1,0) }
  459. on *:dialog:protec:sclick:52: {
  460. if ($did($dname,51)) {
  461. did -ra $dname 49 $did($dname,51)
  462. writeini $checkprotini setup countnum $did($dname,51)
  463. did -r $dname 51
  464. }
  465. }
  466.  
  467. on *:dialog:editprot:sclick:19: {
  468. if ($did($dname,30).text) did -a $dname 11 $ifmatch
  469. if ($ifmatch == Aviso) { did -e $dname 28,27 | did -ra $dname 28 $iif(($readini($checkprotini,$ini($checkprotini,$did($dname,5)),aviso)),$ifmatch,Aviso sin especificar) }
  470. }
  471. on *:dialog:editprot:sclick:20: {
  472. if ($did($dname,11).sel) did -d $dname 11 $ifmatch
  473. set %lines $did($dname,11).lines
  474. while (%lines) {
  475. if ($did($dname,11,%lines) == Aviso) var %ok 1
  476. dec %lines
  477. }
  478. if (!%ok) { did -r $dname 28 | did -b $dname 27,28 }
  479. unset %lines
  480. }
  481. on *:dialog:editprot:sclick:21: {
  482. if ($did($dname,11).sel) {
  483. if ($ifmatch != 1) {
  484. set %up $calc($did($dname,11).sel - 1)
  485. set %down $did($dname,11,%up)
  486. did -o $dname 11 %up $did($dname,11).seltext
  487. did -o $dname 11 $did($dname,11).sel %down
  488. did -c $dname 11 %up
  489. unset %up , %down
  490. }
  491. }
  492. }
  493. on *:dialog:editprot:sclick:26: {
  494. if ($did($dname,11).sel) {
  495. if ($ifmatch != $did($dname,11).lines) {
  496. set %up $calc($did($dname,11).sel + 1)
  497. set %down $did($dname,11,%up)
  498. did -o $dname 11 %up $did($dname,11).seltext
  499. did -o $dname 11 $did($dname,11).sel %down
  500. did -c $dname 11 %up
  501. unset %up , %down
  502. }
  503. }
  504. }
  505. on *:dialog:protec:sclick:16: {
  506. if ($did($dname,15)) {
  507. did -a $dname 18 $did($dname,15)
  508. writeini $checkprotini antispamwords $did($dname,15) ok
  509. }
  510. }
  511. on *:dialog:protec:sclick:17: {
  512. if ($did($dname,18).sel) {
  513. remini $checkprotini antispamwords $did($dname,18).seltext
  514. did -d $dname 18 $did($dname,18).sel
  515. }
  516. }
  517. on *:dialog:protec:sclick:21: {
  518. if ($did($dname,20)) {
  519. did -a $dname 22 $did($dname,20)
  520. writeini $checkprotini Banwords $did($dname,20) ok
  521. }
  522. }
  523. on *:dialog:protec:sclick:23: {
  524. if ($did($dname,22).sel) {
  525. remini $checkprotini Banwords $did($dname,22).seltext
  526. did -d $dname 22 $did($dname,22).sel
  527. }
  528. }
  529. on *:dialog:protec:sclick:54: { writeini $checkprotini Random_kick state $iif(($did($dname,$did).state == 1),1,0) }
  530. on *:dialog:protec:sclick:55: { var %kickfile $findfile($scriptdir,*kicks*.txt,1)
  531. if ($exists(%kickfile) == $true) run %kickfile
  532. else var %error $input(No se encontró ningún fichero con el nombre $+ $crlf $+ kicks.txt en la carpeta $scriptdir $+ $crlf $+ $crlf $+ Por favor cree un archivo kicks.txt con una lista de kicks para poder usar esta opción.,572,Error con ficheros)
  533. }
  534. on *:dialog:protec:sclick:33: { writeini $checkprotini setup protlog $iif(($did($dname,$did).state == 1),1,0) }
  535. on *:dialog:editprot:sclick:81: { writeini $checkprotini Proteger_Modos Todos $iif(($did($dname,$did).state == 1),1,0) }
  536. on *:dialog:editprot:sclick:82: {
  537. did $iif(($did($dname,$did).state == 1),-e,-b) editprot 86
  538. writeini $checkprotini Proteger_Modos Limited $iif(($did($dname,$did).state == 1),1,0)
  539. }
  540. on *:dialog:editprot:sclick:83: {
  541. did $iif(($did($dname,$did).state == 1),-e,-b) editprot 84
  542. writeini $checkprotini Proteger_Modos Otros $iif(($did($dname,$did).state == 1),1,0)
  543. }
  544. on *:load: {
  545. if ($gettok($version,1,46) < 6) {
  546. unload -rs shitlist.mrc
  547. echo -s $+(,$color(Normal text),*) Tu versión actual del mIRC es $version ,para q el addon funcione correctamente se debe de estar usando una version 6.0* o superior
  548. halt
  549. }
  550. auser 46 *!-@*-
  551. auser 46 *!*@*bots.irc-hispano.org*
  552. echo -s $+(,$color(Normal text),* fortress Channel-Protections v4.2 cargado...)
  553. echo -s $+(,$color(Normal text),*) escribe '/fortress' para abrir el diálogo o bien en la barra de menú [fortress/Abrir].
  554. }
  555. on *:dialog:protec:sclick:44: {
  556. var %chan $remove($$?="Escribe el nombre del canal del cual se creará una nueva configuración",\,/,:,*,?,",<,>,|,$chr(32))
  557. if (%chan) {
  558. .copy -o $scriptdirprotec.ini $+($scriptdircanales\,%chan,.ini)
  559. did -a $dname 43 %chan | did -c $dname 43 $did(protec,43).lines | protinit | did -d protec 10 2
  560. }
  561. }
  562. on *:dialog:protec:sclick:45: {
  563. if (($did(protec,43).seltext != Global) && ($did(protec,43).sel)) {
  564. .remove $+($scriptdircanales\,$did(protec,43).seltext,.ini)
  565. did -d protec 43 $did(protec,43).sel
  566. did -c protec 43 1 | protinit | did -d protec 10 2
  567. }
  568. }
  569. on *:dialog:protec:sclick:43: {
  570. .protinit
  571. did -d protec 10 2
  572. }
  573.  
  574. alias -l ProtecClose.check {
  575. ProtecClose Flood_lineas 2 | ProtecClose Flood_caract 3 | ProtecClose Flood_repet 4 | ProtecClose Flood_acciones_lineas 5
  576. ProtecClose Flood_Acciones_caract 6 | ProtecClose Flood_notices_lineas 7 | ProtecClose Flood_notices_caract 8
  577. ProtecClose Flood_Join 9 | ProtecClose Flood_CTCPs 10 | ProtecClose Topic 11
  578. ProtecClose Exceso_Mayúsculas 13 | ProtecClose Exceso_colores 14 | ProtecClose Proteger_Modos 15
  579. ProtecClose Palabras_prohibidas 16 | ProtecClose Antispam 17 | ProtecClose Massdeop 19
  580. ProtecClose Masskick 20 | ProtecClose Massban 21
  581. }
  582. on *:dialog:protec:sclick:10: { if ($gettok($did($dname,10,1),1,32) == stateclick) { .timerprot -m 1 100 ProtecClose.check | break } }
  583.  
  584.  
  585. ; - REMOTES EVENTOS DE PROTECCIONES -
  586. alias -l readpr {
  587. var %chan $scriptdircanales\ $+ $chan $+ .ini
  588. return $remove($iif(($exists(%chan) == $true),$readini(%chan,$1,$2-),$readini($scriptdirprotec.ini,$1,$2-)),$chr(160))
  589. }
  590.  
  591. alias -l protstate { return $readpr(setup,state) }
  592.  
  593. on ^*:TOPIC:#: {
  594. if ($level($fulladdress) != 46) && ($nick != $me) {
  595. if ($protstate == 1) {
  596. var %var = $+(%,Infraccion.,$nick,.,$chan)
  597. inc -u $+ $readpr(Topic,seg) $eval(%var,1)
  598. if ($eval(%var,2) >= $readpr(Topic,num)) {
  599. if ($readpr(Topic,State) == 1) {
  600. protpenalty Topic
  601. }
  602. haltdef
  603. }
  604. }
  605. }
  606. }
  607.  
  608. CTCP 1:*:#: {
  609. if ($level($fulladdress) != 46) && ($nick != $me) {
  610. if ($protstate == 1) {
  611. var %var = $+(%,Infraccion.,$nick,.,$chan)
  612. inc -u $+ $readpr(Flood_CTCPs,seg) $eval(%var,1)
  613. if ($eval(%var,2) >= $readpr(Flood_CTCPs,num)) {
  614. if ($readpr(Flood_CTCPs,State) == 1) {
  615. protpenalty Flood_CTCPs
  616. }
  617. haltdef
  618. }
  619. }
  620. }
  621. }
  622. on @*:TEXT:*:#: {
  623. if ($protstate == 1) {
  624. if (!$hget(repet)) { hmake repet 200 }
  625. if ($level($nick) == 46) return
  626. if ($nick != $me) {
  627. if ($readpr(Flood_caract,State) == 1) {
  628. if ($len($1-) >= $readpr(Flood_caract,num)) {
  629.  
  630. protpenalty Flood_caract
  631. halt
  632. }
  633. }
  634. if ($readpr(Flood_repet,State) == 1) {
  635. var %texto = $replace($1-,$chr(32),$chr(95))
  636. hinc -u $+ $readpr(Flood_repet,seg) repet $+($nick,.,$chan,.,%texto)
  637. if ($hget(repet,$+($nick,.,$chan,.,%texto)) >= $readpr(Flood_repet,num)) {
  638. protpenalty Flood_repet
  639. halt
  640. }
  641. }
  642. if ($readpr(Flood_lineas,State) == 1) {
  643. var %nick = $+(%,Infraccion.,$nick,.,$chan)
  644. inc -u $+ $readpr(Flood_lineas,seg)) $eval(%nick,1)
  645. if ($eval(%nick,2) >= $readpr(Flood_lineas,num)) {
  646. protpenalty Flood_lineas
  647. halt
  648. }
  649. }
  650. if ($readpr(Antispam,State) == 1) {
  651. set %num $ini($checkprotini2,antispamwords,0)
  652. if (%num >= 1) {
  653. while (%num) {
  654. if ($ini($checkprotini2,antispamwords,%num) iswm $1-) {
  655. protpenalty Antispam
  656. halt
  657. }
  658. dec %num
  659. }
  660. unset %num
  661. }
  662. }
  663. if ($readpr(Palabras_prohibidas,State) == 1) {
  664. var %num $ini($checkprotini2,Banwords,0)
  665. if (%num >= 1) {
  666. while (%num) {
  667. if ($ini($checkprotini2,Banwords,%num) iswm $1-) {
  668. protpenalty Palabras_prohibidas
  669. halt
  670. }
  671. dec %num
  672. }
  673. }
  674. }
  675. if ($readpr(Exceso_mayúsculas,State) == 1) {
  676. if ($mayusnum($1-) >= $readpr(Exceso_mayúsculas,num)) {
  677. protpenalty Exceso_mayúsculas
  678. halt
  679. }
  680. }
  681. if ($readpr(Exceso_colores,State) == 1) {
  682. if ($colornum($1-) >= $readpr(Exceso_colores,num)) {
  683. protpenalty Exceso_colores
  684. halt
  685. }
  686. }
  687. }
  688. }
  689. }
  690. on 1:DEOP:#:{
  691. if ($level($fulladdress) != 46) && ($nick != $me) {
  692. if ($protstate == 1) {
  693. if ($nick != $me) {
  694. if ($readpr(Massdeop,State) == 1) {
  695. var %nick = $+(%,Infraccion.,$nick,.,$chan)
  696. inc -u $+ $readpr(Massdeop,num) $eval(%nick,1)
  697. if ($eval(%nick,2) >= $readpr(Massdeop,seg)) {
  698. protpenalty Massdeop
  699. halt
  700. }
  701. }
  702. }
  703. }
  704. }
  705. }
  706. on 1:NOTICE:*:#: {
  707. if ($level($fulladdress) != 46) && ($nick != $me) {
  708. if ($protstate == 1) {
  709. if ($nick != $me) {
  710. if ($readpr(Flood_notices_caract,State) == 1) {
  711. if ($len($1-) >= $readpr(Flood_notices_caract,num)) {
  712. protpenalty Flood_notices_caract
  713. halt
  714. }
  715. }
  716. if ($readpr(Flood_notices_lineas,State) == 1) {
  717. var %nick = $+(%,Infraccion.,$nick,.,$chan)
  718. inc -u $+ $readpr(Flood_notices_lineas,seg)) $eval(%nick,1)
  719. if ($eval(%nick,2) >= $readpr(Flood_notices_lineas,num)) {
  720. protpenalty Flood_notices_lineas
  721. halt
  722. }
  723. }
  724. }
  725. }
  726. }
  727. }
  728. on 1:ACTION:*:#: {
  729. if ($level($fulladdress) != 46) && ($nick != $me) {
  730. if ($protstate == 1) {
  731. if ($nick != $me) {
  732. if ($readpr(Flood_Acciones_caract,State) == 1) {
  733. if ($len($1-) >= $readpr(Flood_Acciones_caract,num)) {
  734. protpenalty Flood_Acciones_caract
  735. halt
  736. }
  737. }
  738. if ($readpr(Flood_acciones_lineas,State) == 1) {
  739. var %nick = $+(%,Infraccion.,$nick,.,$chan)
  740. inc -u $+ $readpr(Flood_acciones_lineas,seg)) $eval(%nick,1)
  741. if ($eval(%nick,2) >= $readpr(Flood_acciones_lineas,num)) {
  742. protpenalty Flood_acciones_lineas
  743. halt
  744. }
  745. }
  746. }
  747. }
  748. }
  749. }
  750. on 1:KICK:#: {
  751. if ($level($fulladdress) != 46) && ($nick != $me) {
  752. if ($protstate == 1) {
  753. if ($readpr(Masskick,State) == 1) {
  754. var %var = $+(%,Infraccion.,$nick,.,$chan)
  755. inc -u $+ $readpr(Masskick,num) $eval(%var,1)
  756. if ($eval(%var,2) >= $readpr(Masskick,seg)) {
  757. protpenalty Masskick
  758. halt
  759. }
  760. }
  761. }
  762. }
  763. }
  764. on 1:BAN:#: {
  765. if ($level($fulladdress) != 46) && ($nick != $me) {
  766. if ($protstate == 1) {
  767. if ($readpr(Massban,State) == 1) {
  768. var %var = $+(%,Infraccion.,$nick,.,$chan)
  769. inc -u $+ $readpr(Massban,num) $eval(%var,1)
  770. if ($eval(%var,2) >= $readpr(Massban,seg)) {
  771. protpenalty Massban
  772. halt
  773. }
  774. }
  775. }
  776. }
  777. }
  778. on ^1:JOIN:#: {
  779. if ($level($fulladdress) != 46) && ($nick != $me) {
  780. if ($protstate == 1) {
  781. if ($readpr(Flood_Join,State) == 1) {
  782. if ($ignore($fulladdress) == $null) {
  783. var %var = $+(%,Infraccion.,$nick,.,$chan)
  784. inc -u $+ $readpr(Flood_Join,seg) $eval(%var,1)
  785. if ($eval(%var,2) >= $readpr(Flood_Join,num)) {
  786. protpenalty Flood_Join
  787. .ignore -u10 $fulladdress
  788. halt
  789. }
  790. }
  791. }
  792. }
  793. }
  794. }
  795.  
  796. on ^*:MODE:#: {
  797. if ($level($fulladdress) != 46) && ($nick != $me) {
  798. if ($readpr(Proteger_Modos,State) == 1) {
  799. if ($readpr(Proteger_Modos,Todos) == 1) {
  800. protpenalty Proteger_Modos
  801. break
  802. }
  803. if ($readpr(Proteger_Modos,Limited) == 1) {
  804. if (l isin $1-) {
  805. if ($mode+L($1-) >= $readpr(Proteger_Modos,Limitnum)) {
  806. protpenalty Proteger_Modos
  807. break
  808. }
  809. }
  810. }
  811. if ($readpr(Proteger_Modos,Otros) == 1) {
  812. if ($modeOtros($1-) == $true) {
  813. protpenalty Proteger_Modos
  814. }
  815. }
  816. }
  817. }
  818. }
  819. alias -l protpenalty {
  820. if ($nick isop $chan) && ($readpr(setup,op) == 1) return
  821. if ($nick isvo $chan) && ($readpr(setup,voices) == 1) return
  822. if ($nick ishop $chan) && ($readpr(setup,hop) == 1) return
  823. if (!$hget(protec)) hmake protec 100
  824. set %protec $1
  825. if (!$hget(protec,$nick)) hadd protec $nick 0
  826. hinc protec $nick
  827. set %protec.max $numtok($readpr(%protec,action),32)
  828. :loop
  829. if ($hget(protec,$nick) > %protec.max) {
  830. hdec protec $nick
  831. goto loop
  832. }
  833. protaction $gettok($readpr(%protec,action),$hget(protec,$nick),32)
  834. unset %protec*
  835. halt
  836. }
  837.  
  838. alias -l protaction {
  839. if ($1 == Aviso) { if ($me isop $chan) { protaviso %prota } }
  840. elseif ($1 == kick) { if ($me isop $chan) { protkick $2 } }
  841. elseif ($1 == kickban) { if ($me isop $chan) { protban $2 | protkick $2 } }
  842. elseif ($1 == kicktempban) { if ($me isop $chan) { prottempban $2 | protkick $2 } }
  843. elseif ($1 == ban) { if ($me isop $chan) { protban $2 } }
  844. elseif ($1 == tampban) { if ($me isop $chan) { prottempban $2 } }
  845. elseif ($1 == ignore) protignore $2
  846. elseif ($1 == tempignore) prottempignore $2
  847. }
  848.  
  849. alias -l protkick { .kick $chan $nick $iif(($readpr(random_kick,state) == 1),$PDecode($read($findfile($scriptdir,*kicks*.txt,1))),$PDecode($readpr(%protec,text))) $iif(($readpr(setup,countstate) == 1),1# $+ $PDecode($readini($scriptdirprotec.ini,setup,countnum)) $+ )
  850. if ($readpr(setup,countstate) == 1) .inccount
  851. .ignore -u5 $address($nick,4)
  852.  
  853.  
  854. }
  855. alias -l protban { .ban $chan $mask($fulladdress,$readpr(setup,maskban)) }
  856. alias -l prottempban { .ban -u $+ $readpr(setup,tempban) $chan $mask($fulladdress,$readpr(setup,maskban)) | .ignore -u5 $nick }
  857. alias -l prottempignore { .ignore -u $+ $readpr(setup,tempignore) $mask($fulladdress,2) }
  858. alias -l protaviso { .notice $nick 5(fortress(4.2) - Aviso): $readpr(%protec,aviso) }
  859. alias -l protignore { .ignore $nick }
  860. alias -l prottemignore { .ignore -u $+ $readpr(setup,tempignore) $nick }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement