Communauté Eggdrop
Problème de ban-time - Version imprimable

+- Communauté Eggdrop (https://forum.eggdrop.fr)
+-- Forum : Eggdrop et TCL (https://forum.eggdrop.fr/forumdisplay.php?fid=8)
+--- Forum : Eggdrop (https://forum.eggdrop.fr/forumdisplay.php?fid=3)
+--- Sujet : Problème de ban-time (/showthread.php?tid=1644)

Pages : 1 2


RE: Problème de ban-time - aliasangelius - 12/01/2017

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


RE: Problème de ban-time - Alucard`68 - 14/01/2017

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


RE: Problème de ban-time - Alucard`68 - 02/02/2017

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.