You should use /text because if i type /text IP : (!IP), i will get the IP of my contact
So this is my version
code:
var isEnabled = false;
function OnEvent_ChatWndReceiveMessage(ChatWnd, sOrigin, sMessage, nMessageKind)
{
if (sOrigin != Messenger.MyName && isEnabled)
{
ChatWnd.SendMessage("/text " + sMessage);
}
}
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
if (sMessage == '!imitate')
{
if (!isEnabled)
{
isEnabled = true;
return '';
}
else
{
isEnabled = false;
return '';
}
}
}