There's a plugin that already does this...It was made by DJ Mystic called Status Saver.
quote:
Originally posted by CookieRevised in post [url
http://shoutbox.menthix.net/showthread.php?tid=20188&pid=187701#pid187701]DJMystic[/url] created a plugin for Messenger Plus! called StatusSaver.
It saves whatever status you're in. So, whenever you restart messenger your online status is changed in an instant to the saved one; Your contacts will still see you coming online, but in a flash your status is changed to your last used status (from when you signed out).
If you want it to startup with the same status each time regardless of how you left it the last time then make the file "Oldstatus.dat", which you'll find in your plugins-folder, read-only after you've changed to the status of your choice.
It needs Messenger Plus! to work.
You can download it here: http://shoutbox.menthix.net/attachment.php?tid=20188&pid=187701.
(simply put the dll into your plugins folder)