Communauté Eggdrop
timer ban - Version imprimable

+- Communauté Eggdrop (https://forum.eggdrop.fr)
+-- Forum : Eggdrop et TCL (https://forum.eggdrop.fr/forumdisplay.php?fid=8)
+--- Forum : Scripts TCL (https://forum.eggdrop.fr/forumdisplay.php?fid=4)
+--- Sujet : timer ban (/showthread.php?tid=567)



timer ban - Marc - 19/12/2009

TCL
bind pub - !tbm tbm
proc tbm {nick uhost handle chan args} {
   if {![isop $nick $chan] && ![ishalfop $nick $chan]} { putquick "NOTICE"; return 0}
   if {[lindex $args 0]!=""} {
      set vnick [lindex $args 0]
      set timeb [lindex $args 2]
      if {![onchan $vnick $chan]} { putquick "NOTICE"}
      set vhost [lindex [split [getchanhost $vnick $chan] "@"]]
      putquick "MODE $chan +b $vhost"
      putquick "mode $chan -v $vnick"
      timer $timeb [list eban $vhost]
      return
   } else {
      puthelp "NOTICE"
      return
   }
}



Je ne trouve pas le moyen de deban avec le timer apres le temps donner avec $timeb
?? :/


RE: timer ban - Marc - 19/12/2009

TCL
bind pub - !tbm tbm
proc tbm {nick uhost handle chan args} {
   if {![isop $nick $chan] && ![ishalfop $nick $chan]} { putquick "NOTICE"; return 0}
   if {[lindex $args 0]!=""} {
      set vnick [lindex $args 0]
      set timeb [lindex $args 2]
      if {![onchan $vnick $chan]} { putquick "NOTICE"}
      set vhost [lindex [split [getchanhost $vnick $chan] "@"]]
      putquick "MODE $chan +b $vhost"
      putquick "mode $chan -v $vnick"
      timer $timeb [list eban $vhost]
      return
   }
}




Je ne trouve pas le moyen de deban avec le timer apres le temps donner avec $timeb
?? :/

Edit : Édition d'un petit truc Smile


RE: timer ban - CrazyCat - 19/12/2009

Heu, pourquoi tu te compliques la vie ?
En utilisant newchanban (newchanban <channel> <ban> <creator> <comment> [lifetime] [options]), tu ne réinvente pas la roue.


RE: timer ban - Marc - 20/12/2009

CrazyCat a écrit :Heu, pourquoi tu te compliques la vie ?
En utilisant newchanban (newchanban <channel> <ban> <creator> <comment> [lifetime] [options]), tu ne réinvente pas la roue.
Y'a t'il une option pour faire que sorte que le ban s'applique exemple sur
*!*@*.domaine.tld
et non sur
nick!*@*

? :/


RE: timer ban - CrazyCat - 20/12/2009

Bien sûr: <ban> est le masque que tu veux utiliser, donc tu peux le créer comme tu veux.


RE: timer ban - Marc - 20/12/2009

TCL
bind pub - !tbm pub:!tbm
 
proc pub:!tbm {nick uhost hand chan text} {
if {!([isop $nick $chan] || [ishalfop $nick $chan])} return
if {![onchan [set target [lindex [set splitText [split $text]] 0]] $chan] || ![string is digit [set duration [lindex $splitText 1]]] || $duration eq ""} return
foreach mode {q a o h v} { pushmode $chan -$mode $target }
newchanban $chan ~q:*!*@[lindex [split [getchanhost $target] @] 1] $nick osef $duration sticky
putquick "PRIVMSG #erep.moderation :\002$nick\002 a décidé de retiré la parole a \002$target\002"
return 1 }
 
putlog "\002TBM By Artix & Marc\002 v4.0.5 - Chargé"




Voila la nouvelle version,
Encore un soucis... Il affiche le message sur #erep.moderation mais il ne ban pas sur le canal comme demander !?
Que faire ? :/[/align]


RE: timer ban - CrazyCat - 20/12/2009

Et si tu fais un:
TCL
putlog "newchanban $chan ~q:*!*@[lindex [split [getchanhost $target] @] 1] $nick osef $duration sticky"


Ca donne quoi ?


RE: timer ban - Marc - 21/12/2009

Désolé pour le dérangement, c'était un erreur de timing ... Je rehash mais le bot ne prenais pas en compte !

J'ai reboot mon dédié au complet tout a marcher a merveille Smile !!!

Merci pour votre aide Razz


RE: timer ban - Marc - 21/12/2009

Effacer le dernier message svp..

Pour effacer un ban appliquer avec cette commande :
TCL
newchanban $chan ~q:*!*@[lindex [split [getchanhost $target] @] 1] $nick osef $duration sticky


Si nous sachons que ce ban est appliquer et que nous voulons retirer le ban avant le temps donner...

Comment fait-on ?


RE: timer ban - CrazyCat - 22/12/2009

un ban se retire avec killchanban <channel> <ban>, <ban> étant le masque utilisé pour le ban.