Advertisement
Atomico1980

blackspam

May 17th, 2020
1,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 5.01 KB | None | 0 0
  1. # Aquí configuras el chan para trabajar
  2.  
  3. establecer antispam ( chan ) "#colombia"
  4.  
  5.  
  6. # Aquí puedes configurar el mensaje de verificación
  7.  
  8.  
  9. set antispam ( check ) "% nick% Bienvenido al canal% chan%, soy el BOT oficial de operaciones en busca de SPAM / BOT, ¡por favor no responda a este mensaje! Gracias".
  10.  
  11. # Aquí puede configurar el intervalo de tiempo para poner el mensaje (minutos)
  12.  
  13. establecer antispam ( tiempo ) "10"
  14.  
  15.  
  16. # Aquí puedes establecer el motivo de la prohibición
  17.  
  18.  
  19. establecer antispam ( razón ) "% nick% lo siento haz sido sancionado por responder con enlaces de SPAM / BOT".
  20.  
  21. # Aquí puede establecer el tiempo de prohibición (horas)
  22.  
  23. establecer antispam ( btime ) "12"
  24.  
  25. # Aquí puedes establecer qué palabras debe prohibir el bot
  26.  
  27. establecer antispam ( palabras ) {
  28. "* # *"
  29. "*www.*"
  30. "* http: // *"
  31. "* http: //lovers69.pw*"
  32. }
  33.  
  34. # Aquí puede configurar el mensaje que el bot debe dar a la persona # que envió spam
  35.  
  36. set antispam ( ifspammed ) "% nick% ha sido visto enviando spam en el canal% chan%, tiempo de sancion% time% minutos. La próxima vez debes respetar las reglas"
  37.  
  38. # Si desea que el bot informe al abusador en el backchan configurado aquí "1" #o bien, establezca "0"
  39.  
  40. establecer antispam ( backwhat ) "0"
  41.  
  42. # Si configuras antispam (backwhat) "1", pon tu nombre de backchan aquí
  43.  
  44. establecer antispam ( backchan ) "#colombia_ops"
  45.  
  46. # Aquí está el mensaje del mensaje para el backchan
  47.  
  48. set antispam ( backchanmsg ) "ATENCION% nick% con el host% host% ha sido detectado como spam en% chan%. Me envió un mensaje con el siguiente texto:% text%"
  49.  
  50. #Si desea que el bot envíe mensajes a los usuarios al unirse, establezca aquí "1" o #else establece "0"
  51.  
  52. establecer antispam ( spamscan ) "1"
  53.  
  54. ################################################## #####################
  55.  
  56. setudef flag blackspams
  57. bind pub mn | MN .blackspam blackspamer
  58. enlazar msgm - * msgm: blackspam
  59.  
  60. si { ! [ existe información blackspam_running ] } {
  61. timer $ antispam ( tiempo ) blackspam
  62. establecer blackspam_running 1
  63. }
  64.  
  65.  
  66. proc blackspam { } {
  67. antispam global
  68. if { [ channel get $ antispam ( chan ) blackspams ] } {
  69. establecer nicklist [ chanlist $ antispam ( chan ) ]
  70. establecer nick [ lindex $ nicklist [ rand [ llength $ nicklist ] ] ]
  71. foreach user $ nick {
  72. set replace ( % nick % ) $ usuario
  73. set replace ( % chan % ) $ antispam ( chan )
  74. set antispams [ mapa de cadena [ array get replace ] $ antispam ( check ) ]
  75. set handle [ nick2hand $ user ]
  76. putlog "escaneando $ user en busca de spam .."
  77. putquick "PRIVMSG $ usuario: $ antispams"
  78. }
  79. }
  80. timer $ antispam ( tiempo ) blackspam
  81. volver 1
  82. }
  83.  
  84. proc MSGM: blackspam { nick UHOST texto mano } {
  85. botnick antispam global
  86. set handle [ nick2hand $ nick ]
  87. establecer banmask "*! * @ [lindex [split $ uhost @] 1]"
  88. establecer texto [ dividir $ texto ]
  89. conjunto reemplazar ( % nick % ) $ nick
  90. set replace ( % chan % ) $ antispam ( chan )
  91. set replace ( % time % ) $ antispam ( btime )
  92. set replace ( % host % ) $ banmask
  93. establecer reemplazar ( % text % ) $ text
  94. set time [ string map [ array get replace ] $ antispam ( btime ) ]
  95. set chanmessage [ string map [ array get replace ] $ antispam ( backchanmsg ) ]
  96. set nickmessage [ string map [ array get replace ] $ antispam ( ifspammed ) ]
  97. foreach spam $ antispam ( palabras ) {
  98. if { [ string match -nocase $ spam $ text ] } {
  99. foreach chan [ canales ] {
  100. if { [ onchan $ nick $ antispam ( chan ) ] } {
  101. if { [ channel get $ antispam ( chan ) blackspams ] } {
  102. if { [ matchattr $ handle nm | of $ antispam ( chan ) ] } { return 0 }
  103. if { [ isbotnick $ nick ] } { return 0 }
  104. Putserv "PRIVMSG $ nick: $ nickmessage"
  105. if { $ antispam ( backwhat ) == "1" } {
  106. putserv "PRIVMSG $ antispam (backchan): $ chanmessage"
  107. }
  108. newchanban $ chan $ banmask $ botnick $ antispam ( razón ) [ expr $ antispam ( btime ) * 60 ]
  109.   }
  110.     }
  111.     }
  112.    }
  113.   }
  114. }
  115.  
  116. proc blackspamer { nick host hand chan arg } {
  117. antispam global
  118. establecer tipo [ lindex $ arg 0 ]
  119. establecer bandera "blackspams"
  120. if { $ antispam ( chan ) == $ chan } {
  121. if { $ type == "" } { puthelp "PRIVMSG $ chan: Por favor use el comando .blackspam on / off"
  122. volver 0
  123. }
  124. if { $ type == "on" } { channel set $ antispam ( chan ) + $ flag ; putquick "PRIVMSG $ chan: Activando protección SPAM / BOT".
  125. volver 0
  126. }
  127. if { $ type == "off" } { channel set $ antispam ( chan ) - $ flag ; putquick "PRIVMSG $ chan: Desactivando protección SPAM / BOT".
  128. volver 0
  129. }
  130. }
  131. }
  132.  
  133. vincular unirse - | - "* *" blackscan
  134. proc blackscan { nick host hand chan } {
  135. antispam global
  136. set handle [ nick2hand $ nick ]
  137. conjunto reemplazar ( % nick % ) $ nick
  138. set replace ( % chan % ) $ antispam ( chan )
  139. set check [ string map [ array get replace ] $ antispam ( check ) ]
  140. if { $ antispam ( chan ) == $ chan } {
  141. if { [ channel get $ antispam ( chan ) blackspams ] } {
  142. if { [ matchattr $ handle nm | of $ antispam ( chan ) ] } { return 0 }
  143. if { [ isbotnick $ nick ] } { return 0 }
  144. if { $ antispam ( spamscan ) == "1" } {
  145. puthelp "PRIVMSG $ nick: $ verificado"
  146. }
  147. }
  148. }
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement