Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


recherche d'eggdrop
#66
Bonjour djkenny,
Merci encore de ta patience et de ton aide :)

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é :)


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


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
hésitez pas de visité http://www.tchat-fusion.org/
ou part irc /server -m irc.tchat-fusion.org


Messages In This Thread
recherche d'eggdrop - by Darfus - 06/06/2011, 18:15
RE: recherche d'eggdrop - by aliasangelius - 07/06/2011, 16:00
RE: recherche d'eggdrop - by djdu32 - 07/06/2011, 19:58
RE: recherche d'eggdrop - by Darfus - 09/06/2011, 19:24
RE: recherche d'eggdrop - by CrazyCat - 09/06/2011, 22:11
RE: recherche d'eggdrop - by fedora - 09/06/2011, 19:27
RE: recherche d'eggdrop - by Darfus - 10/06/2011, 00:12
RE: recherche d'eggdrop - by Darfus - 10/06/2011, 10:54
RE: recherche d'eggdrop - by CrazyCat - 10/06/2011, 14:16
RE: recherche d'eggdrop - by Darfus - 11/06/2011, 18:07
RE: recherche d'eggdrop - by aliasangelius - 10/06/2011, 14:52
RE: recherche d'eggdrop - by djkenny - 11/06/2011, 18:56
RE: recherche d'eggdrop - by aliasangelius - 11/06/2011, 23:45
RE: recherche d'eggdrop - by Darfus - 12/06/2011, 14:58
RE: recherche d'eggdrop - by lesny - 12/06/2011, 15:06
RE: recherche d'eggdrop - by Ixion - 12/06/2011, 17:29
RE: recherche d'eggdrop - by Darfus - 12/06/2011, 17:18
RE: recherche d'eggdrop - by Darfus - 12/06/2011, 19:02
RE: recherche d'eggdrop - by Ixion - 12/06/2011, 20:45
RE: recherche d'eggdrop - by lesny - 12/06/2011, 20:53
RE: recherche d'eggdrop - by Ixion - 12/06/2011, 21:47
RE: recherche d'eggdrop - by lesny - 12/06/2011, 22:33
RE: recherche d'eggdrop - by Darfus - 12/06/2011, 22:54
RE: recherche d'eggdrop - by Ixion - 13/06/2011, 00:38
RE: recherche d'eggdrop - by aliasangelius - 13/06/2011, 11:19
RE: recherche d'eggdrop - by aliasangelius - 13/06/2011, 11:26
RE: recherche d'eggdrop - by pheeric - 11/10/2011, 14:54
RE: recherche d'eggdrop - by aliasangelius - 11/10/2011, 15:14
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 15:42
RE: recherche d'eggdrop - by CrazyCat - 10/11/2011, 15:48
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 16:14
RE: recherche d'eggdrop - by CrazyCat - 10/11/2011, 16:25
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 16:46
RE: recherche d'eggdrop - by aliasangelius - 10/11/2011, 16:43
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 17:18
RE: recherche d'eggdrop - by aliasangelius - 10/11/2011, 17:41
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 18:31
RE: recherche d'eggdrop - by aliasangelius - 10/11/2011, 19:40
RE: recherche d'eggdrop - by djkenny - 10/11/2011, 21:12
RE: recherche d'eggdrop - by aliasangelius - 10/11/2011, 21:43
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 21:51
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 00:28
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 11:18
RE: recherche d'eggdrop - by DnS - 10/11/2011, 21:57
RE: recherche d'eggdrop - by snip74 - 10/11/2011, 22:27
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 00:31
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 00:44
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 01:26
RE: recherche d'eggdrop - by DnS - 11/11/2011, 07:24
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 09:08
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 10:04
RE: recherche d'eggdrop - by aliasangelius - 11/11/2011, 10:08
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 10:45
RE: recherche d'eggdrop - by CrazyCat - 11/11/2011, 11:12
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 11:31
RE: recherche d'eggdrop - by CrazyCat - 11/11/2011, 11:31
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 11:36
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 11:51
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 12:01
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 12:34
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 14:51
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 19:08
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 20:07
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 20:32
RE: recherche d'eggdrop - by djkenny - 11/11/2011, 21:00
RE: recherche d'eggdrop - by snip74 - 11/11/2011, 21:35

Possibly Related Threads…
Thread Author Replies Views Last Post
  Recherche uno pour eggdrop MRVOLKANO 2 4,436 03/12/2010, 23:45
Last Post: Mrvolks

Forum Jump:


Users browsing this thread: 1 Guest(s)