anticlone
#1
bonjour

Voici mon anticlone, il ne fonctionne plus.
Avant il marchais bien et avait une fonction pour activer ou desactiver et l'activait ds un doc.txt ( /Moderateur/detecteur_on_off.txt)
Apparement il reste sur off Sad

Quelqu'UN pourrait il le corriger et me faire en sorte qu'il agisse desuite sur 3 clones

Par avance merci Smile



tcl
set bcloneChan "#salon"
set bcloneOpChan "#backroom"
 
bind join - * SurveyClonejoin
 
proc SurveyClonejoin {nick uhost hand channel} {
	global RCLO bcloneChan
      if { (![string match *guest* $uhost]) } {
            return 0
      }
      if { $bcloneChan != $channel } {
	      	return 0
	 }
        set RCLO($nick) "[expr [clock seconds] + 1] 1 $uhost"        
 }
 
bind pubm - * proclone
bind notc -|- * proclone
 
proc proclone {nick host hand channel args} {
	global RCLO bcloneChan
      if { $bcloneChan != $channel } {
	      	return 0
	 }
	set detect1 "oui"
	set detect [open scripts/Moderateur/detecteur_on_off.txt r]
	set DET "[string tolower [gets $detect]]"
	close $detect
	if {[lsearch -exact "x $DET" "$detect1"] == -1} { return 0 }
 
	if {[info exists RCLO($nick)]} {
            if {[string length $args] > 60} {
                 putserv "MODE $channel +bim $host"
		     #putserv "PRIVMSG bcloneOpChan : $nick $host clone/flood-attack test tcl"
		     putserv "KICK $channel $nick : Exp/flood(banni join/flood/message/notice)"
                 utimer 10 { putserv "MODE $bcloneChan -m" }
                 utimer 60 { putserv "MODE $bcloneChan -i" }
		     unset RCLO($nick)
                 }
		}
} 
 
proc UnsetClone {} {
	global RCLO
	foreach nick [array names RCLO] {
		if {[lindex $RCLO($nick) 0] < [clock seconds]} {unset RCLO($nick)} 
	}
	utimer 1 UnsetClone
}
foreach t [utimers] {
	if {[lindex $t 1] == "UnsetClone"} {killutimer [lindex $t 2]}
}
UnsetClone

 
###########
# Put Log #
###########
putlog "moderation - Module anticlone.tcl chargé..."


Gilles
Répondre Avertir
#2

Merci d'utiliser les balises [tcl] [/tcl] pour poster du code sinon c'est illisible.
Répondre Avertir
#3
tcl
set bcloneChan "#salon"
set bcloneOpChan "#backroom"
 
bind join - * SurveyClonejoin
 
proc SurveyClonejoin {nick uhost hand channel} {
   global RCLO bcloneChan
      if { (![string match *guest* $uhost]) } {
            return 0
      }
      if { $bcloneChan != $channel } {
            return 0
    }
        set RCLO($nick) "[expr [clock seconds] + 1] 1 $uhost"        
}
 
bind pubm - * proclone
bind notc -|- * proclone
 
proc proclone {nick host hand channel args} {
   global RCLO bcloneChan
      if { $bcloneChan != $channel } {
            return 0
    }
   set detect1 "oui"
   set detect [open scripts/Moderateur/detecteur_on_off.txt r]
   set DET "[string tolower [gets $detect]]"
   close $detect
   if {[lsearch -exact "x $DET" "$detect1"] == -1} { return 0 }
 
   if {[info exists RCLO($nick)]} {
            if {[string length $args] > 60} {
                 putserv "MODE $channel +bim $host"
           #putserv "PRIVMSG bcloneOpChan : $nick $host clone/flood-attack test tcl"
           putserv "KICK $channel $nick : Exp/flood(banni join/flood/message/notice)"
                 utimer 10 { putserv "MODE $bcloneChan -m" }
                 utimer 60 { putserv "MODE $bcloneChan -i" }
           unset RCLO($nick)
                 }
      }
}
 
proc UnsetClone {} {
   global RCLO
   foreach nick [array names RCLO] {
      if {[lindex $RCLO($nick) 0] < [clock seconds]} {unset RCLO($nick)}
   }
   utimer 1 UnsetClone
}
foreach t [utimers] {
   if {[lindex $t 1] == "UnsetClone"} {killutimer [lindex $t 2]}
}
UnsetClone


Gilles
Répondre Avertir
#4
N'ayant pas de reponse , mes balises sont pas bonnes ?
Si c'est le cas dsl
comment faire
Merci
Gilles
Répondre Avertir
#5
Quel message d'erreur as tu, si tu en as un ... ?
CrazyCat a écrit :La prochaine fois, essaye d'imaginer que j'ai un cerveau ...
Répondre Avertir
#6
bonjour,
j'ai pas de message d'erreur
Gilles
Répondre Avertir
#7
Aucun message d'erreur
voici mon anticlone postez.
Serait il possible aussi de faire comme dans le sujet " flood a répétition " et pouvoir le configurer pour le mettre sur tel ou tel chan?
Et de pouvoir configurer le nombre de clones ( 2, 3 ou plus selon le chan )

Par avance merci
Gilles
Répondre Avertir


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté