Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Aquí configuras el chan para trabajar
- establecer antispam ( chan ) "#colombia"
- # Aquí puedes configurar el mensaje de verificación
- 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".
- # Aquí puede configurar el intervalo de tiempo para poner el mensaje (minutos)
- establecer antispam ( tiempo ) "10"
- # Aquí puedes establecer el motivo de la prohibición
- establecer antispam ( razón ) "% nick% lo siento haz sido sancionado por responder con enlaces de SPAM / BOT".
- # Aquí puede establecer el tiempo de prohibición (horas)
- establecer antispam ( btime ) "12"
- # Aquí puedes establecer qué palabras debe prohibir el bot
- establecer antispam ( palabras ) {
- "* # *"
- "*www.*"
- "* http: // *"
- "* http: //lovers69.pw*"
- }
- # Aquí puede configurar el mensaje que el bot debe dar a la persona # que envió spam
- 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"
- # Si desea que el bot informe al abusador en el backchan configurado aquí "1" #o bien, establezca "0"
- establecer antispam ( backwhat ) "0"
- # Si configuras antispam (backwhat) "1", pon tu nombre de backchan aquí
- establecer antispam ( backchan ) "#colombia_ops"
- # Aquí está el mensaje del mensaje para el backchan
- 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%"
- #Si desea que el bot envíe mensajes a los usuarios al unirse, establezca aquí "1" o #else establece "0"
- establecer antispam ( spamscan ) "1"
- ################################################## #####################
- setudef flag blackspams
- bind pub mn | MN .blackspam blackspamer
- enlazar msgm - * msgm: blackspam
- si { ! [ existe información blackspam_running ] } {
- timer $ antispam ( tiempo ) blackspam
- establecer blackspam_running 1
- }
- proc blackspam { } {
- antispam global
- if { [ channel get $ antispam ( chan ) blackspams ] } {
- establecer nicklist [ chanlist $ antispam ( chan ) ]
- establecer nick [ lindex $ nicklist [ rand [ llength $ nicklist ] ] ]
- foreach user $ nick {
- set replace ( % nick % ) $ usuario
- set replace ( % chan % ) $ antispam ( chan )
- set antispams [ mapa de cadena [ array get replace ] $ antispam ( check ) ]
- set handle [ nick2hand $ user ]
- putlog "escaneando $ user en busca de spam .."
- putquick "PRIVMSG $ usuario: $ antispams"
- }
- }
- timer $ antispam ( tiempo ) blackspam
- volver 1
- }
- proc MSGM: blackspam { nick UHOST texto mano } {
- botnick antispam global
- set handle [ nick2hand $ nick ]
- establecer banmask "*! * @ [lindex [split $ uhost @] 1]"
- establecer texto [ dividir $ texto ]
- conjunto reemplazar ( % nick % ) $ nick
- set replace ( % chan % ) $ antispam ( chan )
- set replace ( % time % ) $ antispam ( btime )
- set replace ( % host % ) $ banmask
- establecer reemplazar ( % text % ) $ text
- set time [ string map [ array get replace ] $ antispam ( btime ) ]
- set chanmessage [ string map [ array get replace ] $ antispam ( backchanmsg ) ]
- set nickmessage [ string map [ array get replace ] $ antispam ( ifspammed ) ]
- foreach spam $ antispam ( palabras ) {
- if { [ string match -nocase $ spam $ text ] } {
- foreach chan [ canales ] {
- if { [ onchan $ nick $ antispam ( chan ) ] } {
- if { [ channel get $ antispam ( chan ) blackspams ] } {
- if { [ matchattr $ handle nm | of $ antispam ( chan ) ] } { return 0 }
- if { [ isbotnick $ nick ] } { return 0 }
- Putserv "PRIVMSG $ nick: $ nickmessage"
- if { $ antispam ( backwhat ) == "1" } {
- putserv "PRIVMSG $ antispam (backchan): $ chanmessage"
- }
- newchanban $ chan $ banmask $ botnick $ antispam ( razón ) [ expr $ antispam ( btime ) * 60 ]
- }
- }
- }
- }
- }
- }
- proc blackspamer { nick host hand chan arg } {
- antispam global
- establecer tipo [ lindex $ arg 0 ]
- establecer bandera "blackspams"
- if { $ antispam ( chan ) == $ chan } {
- if { $ type == "" } { puthelp "PRIVMSG $ chan: Por favor use el comando .blackspam on / off"
- volver 0
- }
- if { $ type == "on" } { channel set $ antispam ( chan ) + $ flag ; putquick "PRIVMSG $ chan: Activando protección SPAM / BOT".
- volver 0
- }
- if { $ type == "off" } { channel set $ antispam ( chan ) - $ flag ; putquick "PRIVMSG $ chan: Desactivando protección SPAM / BOT".
- volver 0
- }
- }
- }
- vincular unirse - | - "* *" blackscan
- proc blackscan { nick host hand chan } {
- antispam global
- set handle [ nick2hand $ nick ]
- conjunto reemplazar ( % nick % ) $ nick
- set replace ( % chan % ) $ antispam ( chan )
- set check [ string map [ array get replace ] $ antispam ( check ) ]
- if { $ antispam ( chan ) == $ chan } {
- if { [ channel get $ antispam ( chan ) blackspams ] } {
- if { [ matchattr $ handle nm | of $ antispam ( chan ) ] } { return 0 }
- if { [ isbotnick $ nick ] } { return 0 }
- if { $ antispam ( spamscan ) == "1" } {
- puthelp "PRIVMSG $ nick: $ verificado"
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement