Use API to Purge One Chat Message?

i have the following line:

$server->send_raw(sprintf("PRIVMSG %s .timeout %s 1", $ch->getName(), $n));

Do I need to do something else to make the purging work?