Communauté Eggdrop
faire une Infoline - 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 : faire une Infoline (/showthread.php?tid=325)



faire une Infoline - fedora - 22/01/2009

bonjour,

voila je souhaiterai faire un système d'infoline par flag et je flanche sur l'ajout d'un texte après le Hand je ne vois pas trop comment réalisé cela .
voici le code qui fonctionne très bien quand le flag à l'user et ajouté
tcl
bind pub A .info1 pub:info1
proc pub:info1 {nick uhost hand chan arg} {
	global botnick  
      set nick [lindex $arg 0]
      adduser $nick $nick*!*@*
      chattr $nick +X
      putserv "PRIVMSG $chan :le hand 13\[$nick13\] est bien ajouté "


et je souhaiterai faire .info1 blablabla ce qui afficherai le hand plus une phrase quelconque.

cordialement.


RE: faire une Infoline - BdS - 22/01/2009

J'ai trouvé ça, je pense que ça peut t'aider (source ici):

Citation :info

/msg botnick info <password> [channel] [an info line]
Whatever you set as your info line will be shown when you join the channel, as long as you haven't been there in the past three minutes. It is also shown to people when they ask the bot for who or whois. You may set an info line specific to a channel like so:

/msg botnick info mypass #channel This is my info.

Or you may set the default info line (used when there is no channel-specific one) like so:

/msg botnick info mypass This is my info.

/msg botnick info <password> [channel] NONE
Erases your info line.

Examples


/msg NiceBot info secret7 la la la...



RE: faire une Infoline - CrazyCat - 22/01/2009

Tout d'abord, merci de lire ce post sur les codes de mise en forme, j'ai nettoyé ton code mais la prochaine fois je delete.

Ensuite, tu ne devrais pas redéfinir $nick.

Et ta solution serait surement:
tcl
proc pub:info1 {nick uhost handle chan text} {
   set victim [lindex $text 0]
   set infoline [lindex [split $text] 1 end]
   set vhand [finduser "$victim*!*@*"]
   if { $vhand eq "*" } {
      adduser $victim $victim*!*@*
      set vhand [nick2hand $victim]
   }
   setchaninfo $vhand $chan $infoline
}





RE: faire une Infoline - fedora - 22/01/2009

Désolé CrazyCat je ferais un peut plus attention et merci pour votre aides .
donc voila ce que j'ai fait finalement:
http://tagx.nirc.fr/tagx.php?page=TagX&file=codes/code22012009170402.txt

quand je tape .info Coucou c'est moi ça fonctionne,mais quand je tape .info il vire pas l'info

cordialement .


RE: faire une Infoline - BdS - 23/01/2009

As tu essayé de mettre NONE au lieu de tes "" dans:

tcl
setuser $hand xtra info$chan ""





RE: faire une Infoline - fedora - 23/01/2009

Oui j'ai essayé mais ça ajoute en Infoline .j'vois pas comment faire pour qu'il soit suprimé


RE: faire une Infoline - fedora - 23/01/2009

j'ai retourné le code en long ,large est travers ajouté l'info il le fait sans souci mais impossible de l'enlève après.même en party line .info NONE ça m'indique qu'il est bien enlevé mais au join du salon l'info et tjr la (rire)
j'vois vraiment pas ou ce trouve le souci . :/

cordialement


RE: faire une Infoline - fedora - 23/01/2009

:s j'ai modifié
Citation : proc pub:nfo {nick hand host chan arg}
qui est je pense beaucoup mieux mais en party line j'ai cette erreur
Citation :No such user.
http:// http://tagx.nirc.fr/tagx.php?page=TagX&file=codes/code23012009131558.txt

cordialement


RE: faire une Infoline - BdS - 24/01/2009

Moi je pense que tu penses mal:

CrazyCat dans un autre thread a écrit :Voici le bon ordre
tcl
proc addop:pub { nick host hand chan arg } {


Le premier code était le bon.