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


Messages dans ce sujet
Problème de ban-time - par Alucard`68 - 08/01/2017, 12:35
RE: Problème de ban-time - par CrazyCat - 08/01/2017, 18:12
RE: Problème de ban-time - par Alucard`68 - 09/01/2017, 12:25
RE: Problème de ban-time - par Alucard`68 - 10/01/2017, 02:47
RE: Problème de ban-time - par CrazyCat - 10/01/2017, 08:38
RE: Problème de ban-time - par Alucard`68 - 10/01/2017, 12:35
RE: Problème de ban-time - par CrazyCat - 10/01/2017, 12:39
RE: Problème de ban-time - par Alucard`68 - 10/01/2017, 12:48
RE: Problème de ban-time - par aliasangelius - 10/01/2017, 14:39
RE: Problème de ban-time - par cestlemien - 10/01/2017, 15:24
RE: Problème de ban-time - par Alucard`68 - 10/01/2017, 19:39
RE: Problème de ban-time - par aliasangelius - 11/01/2017, 18:06
RE: Problème de ban-time - par Alucard`68 - 12/01/2017, 00:59
RE: Problème de ban-time - par aliasangelius - 12/01/2017, 01:41
RE: Problème de ban-time - par CrazyCat - 12/01/2017, 08:47
RE: Problème de ban-time - par aliasangelius - 12/01/2017, 12:02
RE: Problème de ban-time - par Alucard`68 - 14/01/2017, 01:20
RE: Problème de ban-time - par Alucard`68 - 02/02/2017, 20:07

Atteindre :


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