Communauté Eggdrop
recherche d'eggdrop - 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 : recherche d'eggdrop (/showthread.php?tid=967)

Pages : 1 2 3 4 5


RE: recherche d'eggdrop - djkenny - 11/11/2011

vérifies ta configuration du tcl


RE: recherche d'eggdrop - snip74 - 11/11/2011

Bonjour djkenny,
Bon j'ai beau chercher mais sa veut pas Smile

maintenant sa fonctionne mais pas correctement sur le salon uno sa me voice a 2 ligne et sa me devoice pas après le temps donner.


Salon #Teste
Citation :[18:00:02] <Curieux74> f"ff
[18:00:03] <Curieux74> 'f"'f
[18:00:04] <Curieux74> "'f"'f"'
[18:00:05] <Curieux74> ff"'f"'
[18:00:06] <Curieux74> f'f"'f
[18:00:07] * ToxeaMia sets mode: +v Curieux74
[18:02:34] * ToxeaMia sets mode: -v Curieux74

et salon #uno
Citation :[18:01:44] <Curieux74> cece
[18:01:45] <Curieux74> ecec
[18:01:46] * ToxeaMia sets mode: +v Curieux74
sur se salon j'attend qu'il me devoice mais rien Smile

djkenny a écrit :vérifies ta configuration du tcl

Cordialement Stéphane


RE: recherche d'eggdrop - djkenny - 11/11/2011

t'as pas d'erreurs en pl?


RE: recherche d'eggdrop - snip74 - 11/11/2011

Bonjour djkenny,
merci encore Wink

Non aucune erreur :/

djkenny a écrit :t'as pas d'erreurs en pl?

et depuis que j'ai posté le dernier message je suis toujour voice sur le salon #uno Smile

Cordialement Stéphane


RE: recherche d'eggdrop - djkenny - 11/11/2011

chez moi tout fonctionne bien
Citation :#salon1
[19:51] <Dj_KennY> Mad
[19:51] <Dj_KennY> Mad
[19:51] <Dj_KennY> Mad
[19:51] <Dj_KennY> Mad
[19:52] • Tu as été voicé par CServe.
[19:53] <+Dj_KennY> Mad
[19:56] • Tu as été dévoicé par CServe.

#salon2
[19:52] <Dj_KennY> x:
[19:52] <Dj_KennY> Mad
[19:52] <Dj_KennY> Mad
[19:52] <Dj_KennY> Mad
[19:52] <Dj_KennY> Mad
[19:52] • Tu as été voicé par CServe.
[19:55] • Tu as été dévoicé par CServe.

tu n'as pas modifiés le tcl?


RE: recherche d'eggdrop - snip74 - 11/11/2011

Bonjour djkenny,
Merci encore de ta patience et de ton aide Smile

Non j'ai copier coller ton dernier code changer la ligne :

variable salons "#salon1 #salon2 #salon3"
en
variable salons "#teste #uno"

Puis rehash et restart en ctcp eggdrop chat

Et il possible que sa viens qu'il n'est que sur 2 salons pour mes teste ?
J'avoue que je n'est pas testé vue que je viens juste d'y pensé Smile


Je mais quand même le code au cas ou mais bon je pense pas que sa va changer grand chose Smile

Code :
namespace eval ::av {
   variable salons "#teste #uno"
   variable time 2
   variable lignes 5


   bind time - "* * * * *" av::Vvoice
   proc Vvoice {1 2 3 4 5} {
      variable idle
      variable salons
      variable time
      foreach salon [string tolower $salons] {
         if ![validchan $salon] continue
         foreach nick [chanlist $salon] {
            if {[isbotnick $nick] || [isop $nick $salon]} continue
            if {[info exists idle($salon)] && [dict exists $idle($salon) $nick]} {
               set n [dict get $idle($salon) $nick]
               set t1 [lindex $n 1]
               set t [expr [unixtime]-$t1]
               if {$t>[expr $time*60] && [isvoice $nick $salon]} {
                  pushmode $salon -v $nick
               }
               if {$t>300} {
                  dict set idle($salon) $nick [list 0 $t1]
               }
            } else {
               dict set idle($salon) $nick [list 0 [unixtime]]
            }
         }
         flushmode $salon
      }
   }

   bind pubm - * av::Pvoice

   proc Pvoice {nick host hand chan arg} {
      variable lignes
      variable salons
      variable idle
      set chan [string tolower $chan]
      if {[lsearch -nocase $salons $chan]==-1 || [isbotnick $nick]} return
      if {[info exists idle($chan)] && [dict exists $idle($chan) $nick]} {
         set n [dict get $idle($chan) $nick]
         set i [lindex $n 0]
         dict set idle($chan) $nick [list [incr i] [unixtime]]
         if {$i>=$lignes} {pushmode $chan +v $nick}
      } else {
         dict set idle($chan) $nick [list 1 [unixtime]]
      }
   }

   bind join - * av::joinC

   proc joinC {nick host hand chan} {
      variable salons
      set chan [string tolower $chan]
      if {[lsearch -nocase $salons $chan]==-1 || [isbotnick $nick]} return
      variable idle
      dict set idle($chan) $nick [list 0 [unixtime]]
   }

   bind nick - * av::chgn

   proc chgn {nick host hand chan new} {
      variable salons
      set chan [string tolower $chan]
      if {[lsearch -nocase $salons $chan]==-1 || [isbotnick $nick]} return
      variable idle
      if {[info exists idle($chan)] && [dict exists $idle($chan) $nick]} {
         dict set idle($chan) $new [dict get $idle($chan) $nick]
         dict unset idle($chan) $nick
      } else {
         dict set idle($chan) $new [list 0 [unixtime]]
      }
   }
}


Cordialement Stéphane