recherche d'eggdrop
#66
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
hésitez pas de visité http://www.tchat-fusion.org/
ou part irc /server -m irc.tchat-fusion.org
Répondre Avertir


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

Atteindre :


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