I don't know weather or not this is possible but I know that you can enable a setting in MSN Messenger that Brings up the last few things said between you and a contact when you open their conversation window. This can only work if you enable chat logging with MSN Messenger though. To enable this feature, on the main MSN Messenger window, go to Tools --> Options... ---> Click the Messages tab on the side of the window ---> check Automaticaly keep history of my conversations and Show my last conversation in new conversation window.
I think it would be possible for a plugin to work with these settings to do the command you suggested. Don't know if this is done or not though