I know that it's a simple matter - I have done a search and tried some of the solutions (with no results) - but this has been bugging me for a few weeks now, and I can't figure it out.
on *:input:*: if (/ping == $$1) { set %ping. [ $+ [ $$2 ] ] $ticks | .ctcp $$2 ping }
on *:CTCPREPLY:PING*: echo -s $calc(($ticks - %ping. [ $+ [ $nick ] ])/1000)
I modified the code a bit.. it had some IF's and /notices, but it doesnt change the issue.
What I want is to echo a ping reply in miliseconds.
Eg: 1.282. I
know that the theory is correct. I got the values that were echo'd, did a manual $calc and the results were as I wanted to: 1.282s.
My point is that I don't seem to be able to make that $calc in the script. I've tried to use both
$ticks - $2 /1000 and the version with variable that you see above, none with success. And yet, if I do a manual $calc, it works fine.
What is the problem there? :P
Edit: fixed typo on post, ty dr Eamer