Communauté Eggdrop
join avec putfast - 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 : join avec putfast (/showthread.php?tid=434)



join avec putfast - Babytigrou16 - 19/06/2009

Bonjour on ma donner un TCL mais malheuresement sa ne fonctionne mais je c que la remote fonctionne la question est c'est quoi putfash et pk il veux pas marcher )Sad svp aider moi merci


bind join - "*" join
proc join { nick uhost hand chan } {
global join
if {
[string match -nocase *@AnimPlus.zet-land.org $uhost] ||
[string match -nocase *@ChanAdmin.zet-land.org $uhost] ||
[string match -nocase *@CoChefZone.zet-land.org $uhost] ||
[string match -nocase *@OpZone.zet-land.org $uhost] ||
[string match -nocase *@AdminZone.zet-land.org $uhost] ||
[string match -nocase *@ChanOp.zet-land.org $uhost]
} {
putfast "SAJOIN $nick #Staff+"
putfast "SAJOIN $nick #Staff"
putfast "SAJOIN $nick #Aide-Staff"
} }

Sa ne veux pas joindre rapidement si je met putserv le bot il prend trop de temps tandi que putfast sa prend 20sec meme pas Very Happy jai aussi sa mais bizzard jai ajouter mais le robot ne fait rien jai meme pas des message d erreur mais il sajoin pas ...

###############
## PUTFAST ##################################################
## Améliore la vitesse des commandes mais peut etre instable ##
###############################################################

proc putfast {arg} {
append arg "\n"
putdccraw 0 [string length $arg] $arg
}


RE: join avec putfast - heretoc - 19/06/2009

Arrete ac tes nocase tel que je te connais ton tcl en est remplie pour chaques commandes ....
Regarde le clam moderation dans la partie telechargement, il est plus pratique pour gerer les vhosts .....
Cela est plus simple de predefinir les vhosts au paravant pour moin encombrer le code ..
Après si tu m'ecoute jamais Very Happy

Suis pas chez moi donc je pourais pas forcement repondre (sinon utilise les balises [ tcl ] et [ /tcl ])


RE: join avec putfast - Babytigrou16 - 19/06/2009

ok mais quand meme si je prend ton systeme .... sa marche pas plus Smile


RE: join avec putfast - Artix - 19/06/2009

Ton truc est vraiment anti-euh, bien :
paske ton script modifie la commande "join" inclue dans TCL, et c'est un vrai "must" (sans ça, tu peux pas faire de listes, donc une très très grande partie de tes scripts ne fonctionneront pas !)
D'après ton truc, voila une version un peu plus cohérente je pense :

tcl
set autoSAJoinList { AnimPlus.zet-land.org ChanAdmin.zet-land.org CoChefZone.zet-land.org OpZone.zet-land.org AdminZone.zet-land.org ChanOp.zet-land.org }
bind join - * autoSAJoinProc 
 
proc autoSAJoinProc {nick uhost hand chan} {
if {[lsearch -glob $::autoSAJoinList [lindex [split $uhost @] 1]]} {
putfast "SAJOIN $nick #Staff,#Staff+,#Aide-Staff" }
return }





RE: join avec putfast - heretoc - 19/06/2009

Ou alors :
tcl
set vhostniv1 {
AnimPlus.zet-land.org 
ChanAdmin.zet-land.org 
CoChefZone.zet-land.org 
OpZone.zet-land.org 
AdminZone.zet-land.org 
ChanOp.zet-land.org
}
 
bind join - "*" sajoinauto
proc sajoinauto {nick host hand arg} {
 global vhostniv1 sajoinauto
  foreach vhost $vhostniv1 {
  if [string match -nocase $vhost $host]  {
putfast "SAJOIN $nick #staff"
putfast "SAJOIN $nick #staff+"
putfast "SAJOIN $nick #aide-staff"
    }  
  }
}