For changing your name to your contact's name, you can use this script:
http://www.msgplus.net/scripts/view/72-USay/
And the following (untested) script should use the usay script (link above) to change your name and re-send their message. It prefixes all of your messages with two non-breaking spaces so it knows not to re-send them.
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
if (Message.substring(0,2) == ' ') return Message;
ChatWnd.SendMessage('/usay ' + Message);
return Message;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if (Message.chatAt(0) != '/' && Message.charAt(0) != '/') Message = ' ' + Message;
return Message;
}
Please note: There are probably better ways to check if the message was sent from you or not, and the method i used could mess with other scripts.