Oh I didn't see.
phrozen, you cannot use data as token like $2- by not using tokenize command if theres not already tokenized.
;--------
;there should be like below code if there not using tokenizing;
if ($gettok(%temp,1,32) == ping) sockwrite -tn $sockname pong $gettok(%temp,2-,32)
;--------
by using tokenize command;
if ($1== ping) sockwrite -tn $sockname pong $2-
;-------