Communauté Eggdrop
bind chon eggdrop - Version imprimable

+- Communauté Eggdrop (https://forum.eggdrop.fr)
+-- Forum : Eggdrop et scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=8)
+--- Forum : Scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=4)
+--- Sujet : bind chon eggdrop (/showthread.php?tid=1279)



bind chon eggdrop - bouba89 - 03/12/2012

bonjour j'ai coder un tcl pour que quand quelq'un se connecte a la party-line de l'eggdrop cela l'indique sur un salon predefini hors celui -ci ne semble rien detecter peut etre manque t'il des choses ?

merci d'avance de vos reponses


Code :
bind chon - join:pl bind chof - deco:pl set chan(log) "#staff" proc join:pl {hand idx} { "privmsg $chan(log) :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036" dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034" } proc deco:pl {hand idx} { "privmsg $chan(log) :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036" dccbroadcast "\00312Déconnection PL pour \0034$hand\0034" }



RE: bind chon eggdrop - CrazyCat - 03/12/2012

As-tu pensé à mettre des putlog pour voir si tu passes dans tes procédures.
Et il faut utiliser $::chan(log) (vu que chan(log) est défini hors de la procédure).
Et il ne te manque pas quelque chose avant "privmsg ...' ? Comme un putserv ?


RE: bind chon eggdrop - bouba89 - 03/12/2012

Code :
bind chon - join:pl bind chof - deco:pl set chan(log) "#staff" proc join:pl {hand idx} { putserv "privmsg $::chan(log) :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036" dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034" } proc deco:pl {hand idx} { putserv "privmsg $::chan(log) :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036" dccbroadcast "\00312Déconnection PL pour \0034$hand\0034" } putlog "\002\0034Chargement.. \002\037\0031Paty-line.tcl V1.0 by bouba89 \037\0031"


cela donne rien :(


RE: bind chon eggdrop - CrazyCat - 03/12/2012

Je ne vois pas les putlog de debug, ni même de rtour de .binds chon


RE: bind chon eggdrop - bouba89 - 03/12/2012

au risque de paraître nul j'apprend juste le tcl donc ta réponse pour moi c'est du charabia désole d’être débutant :x


RE: bind chon eggdrop - CrazyCat - 04/12/2012

Ok, alors voici comment on debugue:
Code :
set chan(log) "#staff" bind chon - join:pl proc join:pl {hand idx} { putlog "Procédure join:pl activée par $hand - $idx" putserv "privmsg $::chan(log) :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036" putlog "PRIVMSG ok, test broadcast" dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034" putlog "BROADCAST ok" return 0 } bind choff - deco:pl proc deco:pl {hand idx} { putlog "Procédure deco:pl activée par $hand - $idx" putserv "privmsg $::chan(log) :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036" putlog "PRIVMSG ok, test broadcast" dccbroadcast "\00312Déconnection PL pour \0034$hand\0034" putlog "BROADCAST ok" return 0 } putlog "\002\0034Chargement.. \002\037\0031Paty-line.tcl V1.0 by bouba89 \037\0031"
Ensuite, on se connecte en party-line, on fait un .rehash et on tapes:
Code :
.binds chon
Et là, tu vois:
Code :
Liaisons de commande: TYPE FLAGS COMMAND HITS BINDING (TCL) No command bindings for type: chon.
Donc, tu vas chercher sur http://wiki.eggdrop.fr/Binds#CHON et tu lis:
wiki a écrit :Syntaxe: bind chon <flags> <mask> <proc>
Ah ben voila, tu as oublié le masque (qui est normalement *)


RE: bind chon eggdrop - bouba89 - 04/12/2012

merci CrazyCat cela fonctionne

cordialement