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


[Bug] script bot socket
#1
Bonjour, j'ai trouvé ce petit bout de code de CrazyCat dans les archives


tcl
namespace eval sockegg {
  
  set egg(clone1) {
     nick "clone1"
     realname "I am a clone"
     identd "UserRBL"
     serv   "irc.radiobluelight.fr"
     port   6667
     host   "radiobluelight.fr"
     idx   0
  }
  
  variable bot
  
  bind dcc - "clone" [namespace current]::come
  proc come { i f a } {
     [namespace current]::connect clone1 $a
  }
  
  proc connect {nick chan} {
     variable egg
     variable bot
     array set bot $egg($nick)
     putlog "Going to $bot(serv)"
     set mserver $bot(serv)
     set mport $bot(port)
     putlog "Connection to $mserver $mport"
     set bot(idx) [::connect $mserver $mport]
     control $bot(idx) $chan
     putdcc $bot(idx) "USER $bot(nick) 0 0 :$bot(realname)"
     putdcc $bot(idx) "NICK $bot(nick)"
  }
  
  bind dcc - "unclone" [namespace current]::go
  proc go {i f a} {
     array set ::sockegg::bot $::sockegg::egg($nick)
     killdcc $::sockegg::bot(idx)
     set ::sockegg::bot(idx) 0
  }
}


Mais je me retrouve avec cette erreur que je ne comprend pas

[15:52:48] ‹Oz› .clone
[15:52:48] ‹InterC› [15:52:48] Going to irc.radiobluelight.fr
[15:52:48] ‹InterC› [15:52:48] Connection to irc.radiobluelight.fr 6667
[15:52:48] ‹InterC› [15:52:48] WARNING: open_telnet_raw() is about to block in gethostbyname()!
[15:52:48] ‹InterC› [15:52:48] net: connect! sock 9
[15:52:48] ‹InterC› [15:52:48] Erreur tcl []: invalid command name "9"


Possibly Related Threads…
Thread Author Replies Views Last Post
  Erreur socket limit Amand 4 233 18/06/2022, 15:37
Last Post: Amand
  [Script] "::http::register https 443 ::tls::socket" Kossiwa 12 4,229 07/06/2020, 18:55
Last Post: DaDIsS
  Codage TCL - Socket incorporé KeeViiNou 15 10,106 21/03/2014, 11:46
Last Post: KeeViiNou
  Socket TCL tow 1 4,389 24/11/2012, 08:34
Last Post: Artix
  Bug bizarre : Namespace, array et socket CrazyCat 3 4,452 23/02/2012, 18:12
Last Post: djkenny
  Socket Obu 4 5,112 27/02/2011, 03:37
Last Post: Obu
  Plusieurs connections simultanémment sur une socket. jolo2 1 4,122 23/04/2010, 23:54
Last Post: Marc

Forum Jump:


Users browsing this thread: 1 Guest(s)