Problème de ban-time
#16
Oui aussi

A l'époque j'avais un tcl de modération, sa donner plus ou moins ce genre de truc :

TCL
set expiration(majuscule) "60"
 
bind pubm - * moderation	
  proc moderation { nick host handle channel arg } {
     global modmajuscule modrepetition modmot modspam avert rpt
     set arg [split $arg]
     set msg [join [lrange [split $arg] 0 end]]
     set hostv $nick!$host
     set userhost [getchanhost $nick]
     set userhost "*!*[string range $userhost [string first @ $userhost] e]"
         regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $msg "" msg
         regsub -all -- {\{|\}|\\{|[}{|]}} $msg "" msg
     if {![verify:b $::fichier(modchan) $channel]} {
	 return
	 }
     if {[verify:a $::fichier(protect) $hostv]} {
	 return
	 }
     if {![info exists modmajuscule($host)]} {
	 set modmajuscule($host) 0 
	 utimer $::expiration(majuscule) [list unset modmajuscule($host)]
	 }
     set nombre 0
     foreach x [split $msg {}] {
     if [string match \[A-Z\] $x] {
	 incr nombre
	 }
     }
     if {$nombre > $::detect(majuscule)} {
     incr modmajuscule($host) 1
     if {$::avert(majuscule) < $modmajuscule($host)} {
	     putserv "KICK $channel $nick :$::kick(majuscule)" 
	 set modmajuscule($host) 0 
	 return
	 }
         putserv "NOTICE $nick :$::msg(majuscule)"
}
     if {[info exists rpt($nick)]} {
     if {[lrange $rpt($nick) 2 end]  eq  "$msg"} {
     set cnt [lindex $rpt($nick) 1] 
	 incr cnt
     set rpt($nick) "[lindex $rpt($nick) 0] $cnt [lrange $rpt($nick) 2 end]"
     if {[lindex $rpt($nick) 1] > $::detect(repetition)} {
     if {![info exists modrepetition($host)]} {
	 set modrepetition($host) 0 
	 utimer $::expiration(repetition) [list unset modrepetition($host)]
	 }
     incr modrepetition($host) 1
     if {$::avert(repetition) < $modrepetition($host)} {
	 putserv "KICK $channel $nick :$::kick(repetition)" 
	 set modrepetition($host) 0 
	 return
	 }
      putserv "NOTICE $nick :$::msg(repetition)"
      unset rpt($nick)
     }
   } else {
      set rpt($nick) "[expr [clock seconds] + 10] 1 $msg"
	  }
   } else {
     set rpt($nick) "[expr [clock seconds] + 10] 1 $msg"
	 }
     if {[verify:a $::fichier(modmot) $msg]} {
     if {![info exists modmot($host)]} {
	 set modmot($host) 0 
	 utimer $::expiration(mot) [list unset modmot($host)]
	 }
     incr modmot($host) 1
     if {$::avert(mot) < $modmot($host)} {
	     putserv "MODE $channel +b $userhost"
		 putserv "KICK $channel $nick :$::kick(mot)"
	 set modmot($host) 0 
	 return
	 }
         putserv "NOTICE $nick :$::msg(mot)"
     }
     if {[verify:a $::fichier(modspam) $msg]} {
     if {![info exists modspam($host)]} {
	 set modspam($host) 0
	 utimer $::expiration(spam) [list unset modspam($host)]
	 }
     incr modspam($host) 1
     if {$::avert(spam) < $modspam($host)} {
	 putserv "MODE $channel +b $userhost"
	 putserv "KICK $channel $nick :$::kick(spam)" 
	 set modspam($host) 0 
	 return
	 }
     putserv "NOTICE $nick :$::msg(spam)"
     }
  }



Sa peut-être une piste à explorer Smile
Vous interdisez les erreurs, vous empêchez ainsi la victoire.

Ma super kikoo-page loll
Répondre Avertir
#17
Merci aliasangelius pour se code que je vais étudier et voir si je peu en tirer quelque chose pour régler mon problème Smile
Répondre Avertir
#18
Bonsoir j'avais oublier de revenir sur se post pour vous dire ou j'en était je m'en excuse Smile

Donc voila j'ai résolu mon problème sans modifier le code tout simplement en PL avec le bot grace à ces 2 commandes :
[code].chanset #Salon ban-time 15
.chanset #Salon +dynamicbans[/tcl]
merci à tout ceux qui se sont penché sur mon problème Smile

Bien à vous.

Bye.
Répondre Avertir


Atteindre :


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