Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


Codage TCL - Socket incorporé
#1
Bonjour,

Je suis sur une réalisation d'un codage tcl que j'aimerai rendre le plus efficace possible et sans multiplié les conf sur l'eggdrop alors j'ai pensé que de mettre une seule configuration et plusieurs sockets pourrait etre la solution...
Soucis étant je ne sais pas du tout comment faire le lancement de la proc pour répondre à ceci
tcl
# Socket #
set Bot(bot) "BOt1"
set lBot(nickserv) "NickServ"
set Bot(bot2) "BOt WEB"
set Bot(bot3) "BOt Radio"
set Bot(bot4) "BOt secu"


En cherchant un peu sur d'autre configuration j'ai vu ceci
tcl
######################
## LANCEMENT SOCKET ##
######################
proc lanchsock {} {
global bot
	if {[info exists bot(idx)] && [valididx $bot(idx)]} {return}
	if {![catch "connect $bot(ip) $bot(port)" bot(idx)]} {
		putdcc $bot(idx) "PROTOCTL NICKv2 SJOIN2 UMODE2 NOQUIT VL TKLEXT"
		putdcc $bot(idx) "PASS $bot(pass)"
		putdcc $bot(idx) "SERVER $bot(link) 1 :$bot(real)"
 
		putdcc $bot(idx) ":$bot(link) NICK $bot(bot) 1 [unixtime] $bot(real) $bot(host) $bot(link) 0 +oqS $bot(host) :$bot(ident)"
		putdcc $bot(idx) ":$bot(bot) MODE $bot(bot) +oOSrqswBNghaW"
		putdcc $bot(idx) ":$bot(bot) JOIN $bot(chanircop)"
		putdcc $bot(idx) ":$bot(bot) MODE $bot(chanircop) +q $bot(bot)"
		putdcc $bot(idx) ":$bot(bot) MODE $bot(chanircop) +ntsO"
 
		putdcc $bot(idx) ":$bot(link) NICK $bot(bot2) 1 [unixtime] $bot(real) $bot(host) $bot(link) 0 +oqS $bot(host) :$bot(ident)"
		putdcc $bot(idx) ":$bot(bot2) MODE $bot(bot2) +oOSrqswBNghaW"
		putdcc $bot(idx) ":$bot(bot2) JOIN $bot(chanircop)"
		putdcc $bot(idx) ":$bot(bot2) MODE $bot(chanircop) +q $bot(bot2)"
 
		putdcc $bot(idx) ":$bot(link) NICK $bot(bot3) 1 [unixtime] $bot(real) $bot(host) $bot(link) 0 +oqS $bot(host) :$bot(ident)"
		putdcc $bot(idx) ":$bot(bot3) MODE $bot(bot3) +oOSrqswBNghaW"
		putdcc $bot(idx) ":$bot(bot3) JOIN $bot(chanircop)"
		putdcc $bot(idx) ":$bot(bot3) MODE $bot(chanircop) +h $bot(bot3)"
		putdcc $bot(idx) ":$bot(bot3) JOIN $bot(chanbots)"
		putdcc $bot(idx) ":$bot(bot3) MODE $bot(chanbots) +o $bot(bot3)"
		putdcc $bot(idx) ":$bot(bot3) MODE $bot(chanbots) +ntm"
 
		putdcc $bot(idx) ":$bot(link) NICK $bot(bot4) 1 [unixtime] $bot(real) $bot(host) $bot(link) 0 +oqS $bot(host) :$bot(ident)"
		putdcc $bot(idx) ":$bot(bot4) MODE $bot(bot4) +oOSrqswBNghaW"
		putdcc $bot(idx) ":$bot(bot4) JOIN $bot(chanircop)"
		putdcc $bot(idx) ":$bot(bot4) MODE $bot(chanircop) +h $bot(bot4)"
		putdcc $bot(idx) ":$bot(bot4) JOIN $bot(chanhelp)"
		putdcc $bot(idx) ":$bot(bot4) MODE $bot(chanhelp) +o $bot(bot4)"
		putdcc $bot(idx) ":$bot(bot4) MODE $bot(chanhelp) +nt"
 
		putdcc $bot(idx) ":$bot(link) EOS"
		control $bot(idx) event
	}
	utimer 15 verifidx
}
 
proc verifidx {} {
global bot
if {[valididx $bot(idx)]} {utimer 20 verifidx} else {utimer 2 lanchsock}
}


Soucis rien ne se passe... Pouvez vous m'aider ? Merci.


Messages In This Thread
Codage TCL - Socket incorporé - by KeeViiNou - 19/03/2014, 10:29

Possibly Related Threads…
Thread Author Replies Views Last Post
  Erreur socket limit Amand 4 191 18/06/2022, 15:37
Last Post: Amand
  [Script] "::http::register https 443 ::tls::socket" Kossiwa 12 4,146 07/06/2020, 18:55
Last Post: DaDIsS
  [Bug] script bot socket athor69 0 3,067 31/01/2016, 17:51
Last Post: athor69
  Socket TCL tow 1 4,344 24/11/2012, 08:34
Last Post: Artix
  Bug bizarre : Namespace, array et socket CrazyCat 3 4,399 23/02/2012, 18:12
Last Post: djkenny
  Socket Obu 4 5,064 27/02/2011, 03:37
Last Post: Obu
  Plusieurs connections simultanémment sur une socket. jolo2 1 4,075 23/04/2010, 23:54
Last Post: Marc

Forum Jump:


Users browsing this thread: 1 Guest(s)