Communauté Eggdrop

Version complète : faire une Infoline
Vous consultez actuellement la version basse qualité d’un document. Voir la version complète avec le bon formatage.
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.
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...
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
}


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&f...170402.txt

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

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

tcl
setuser $hand xtra info$chan ""


Oui j'ai essayé mais ça ajoute en Infoline .j'vois pas comment faire pour qu'il soit suprimé
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
: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?pag...131558.txt

cordialement
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.