Communauté Eggdrop
Variable mIRC en TCL - 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 : Variable mIRC en TCL (/showthread.php?tid=1055)



Variable mIRC en TCL - ArKeNiS - 15/10/2011

Bonjour,

Je suis actuellement bloqué sur quelque chose qui bloque mon avancement sur tout mon script...
En effet, je n'arrive pas à traduire le $ctime($1) de mIRC en TCL...
Le $1 étant une date... (15-10-2011).

Si quelqu'un serait...

Merci d'avance,


RE: Variable mIRC en TCL - DnS - 15/10/2011

tcl
variable date [clock format [clock seconds] -format "%A %d %B %Y" -local fr]


ou bien
tcl
set date [clock format [clock seconds] -format "%A %d %B %Y" -local fr]




Cordialement DnS


RE: Variable mIRC en TCL - ArKeNiS - 15/10/2011

Re,

Merci Wink. Je vais tester ça.

Cordialement,


RE: Variable mIRC en TCL - ArKeNiS - 16/10/2011

Salut,

Ce n'est pas ça que je recherchais...

Je voudrais que si je tape !convert 09-03-2012 (exemple) ça me donne l'unixtime de cette date...

Cordialement,


RE: Variable mIRC en TCL - CrazyCat - 17/10/2011

tcl
bind pub - "!convert" time:convert
proc time:convert { nick uhost handle chan args } {
   set date [clock scan $args -format "%d-%m-%Y"]
   putserv "PRIVMSG $chan :$args donne $date"
}


Et voila.


RE: Variable mIRC en TCL - ArKeNiS - 18/10/2011

Salut,

Merci de ton code CrazyCat Wink.