That code is a mess, and it won't work at all.
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message == "!irritant")
{
if (ChatWnd.EditChangeAllowed)
{
for (var i = 0; i< 10; i++)
{
ChatWnd.SendMessage("irritant Hè!");
return "irritant Hè!";
}
}
}
else
{
return Message;
}
}