Communauté Eggdrop
Mon bot me fais une demande de dcc chat - 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 : Mon bot me fais une demande de dcc chat (/showthread.php?tid=551)



Mon bot me fais une demande de dcc chat - loulou7593 - 13/11/2009

Bonjour,
je viens car j'ai un soucis, j'aimerais que mon bot me demande lui meme un dcc chat quand je me auth aupres de lui.

J'ai vu quelque chose du genre
tcl
bind msg - link dcc:dem
proc dcc:dem {nick uhost handle text} {
   puthelp "DCC CHAT $nick"
}



Mais apparement meme juste ca tout seul, ne fonctionne pas donc j'aimerais que mon bot m'invite en dcc chat quand je me auth.

Si quelqu'un a une petite idée merci.


RE: Mon bot me fais une demande de dcc chat - fedora - 13/11/2009

tu peut ajouté un truc dans ce genre si dans ta proc de auth :

tcl
if [validuser $hand] {
  puthelp "DCC CHAT $nick"
}





RE: Mon bot me fais une demande de dcc chat - loulou7593 - 13/11/2009

Ceci serais bon ou pas pour que quand je join le salon
et que je me auth le bot m'envoi une demande de dcc chat ?

tcl
bind join - * showdcc 
proc showdcc {nick uhost hand chan}
global showdcc
if [validuser $hand] {
  puthelp "DCC CHAT $nick"
}





RE: Mon bot me fais une demande de dcc chat - snoopy - 07/12/2009

Pour le dcc chat il faut faire comme cela

tcl
bind join - * showdcc 
proc showdcc {nick uhost hand chan}
global showdcc botnick
if [validuser $hand] {
*ctcp:CHAT $nick $uhost $hand $botnick CHAT 
}





RE: Mon bot me fais une demande de dcc chat - loulou7593 - 07/12/2009

apparement ca ne fonctionne pas.
Voici ce que j'ai en erreure.

[18:02] wrong # args: should be "proc name args body"
while executing
"proc showdcc {nick uhost hand chan}"
(file "scripts/dcc.tcl" line 2)
invoked from within
"source scripts/dcc.tcl"


RE: Mon bot me fais une demande de dcc chat - snoopy - 07/12/2009

tcl
proc showdcc {nick uhost hand chan arg} {



désolé j'avais recopié ton code et juste ajouté la commande dcc .
il manquai arg et un {


RE: Mon bot me fais une demande de dcc chat - loulou7593 - 07/12/2009

Bon là le bot se connecte bien mais par contre en pl j'ai ca comme erreure

[22:22] Tcl error [showdcc]: wrong # args: should be "*ctcp:CHAT nick user@host handle dest/chan keyword text"


RE: Mon bot me fais une demande de dcc chat - snoopy - 08/12/2009

voila comme cela sa marche je viens d'essayé .

tcl
bind join - * showdcc 
proc showdcc {nick host hand chan} {
     global botnick
     if [validuser $hand] {
*ctcp:CHAT $nick $host $hand $botnick CHAT $nick
     }
}