For starters the command is "SET USERSTATUS ONLINE" you forgot the SET, it looks like you might also not be responding to error messages properly, because you should have received "ERROR 2 Unknown command" in your trace, from skype because the "SET" was missing.
Here is what I get doing the same using the utility listed below:
CODE
!!! Pending authorization
!!! Try connect now (API available); issue #connect
!!! Connected; to terminate issue #disconnect
Message from Skype(0): CURRENTUSERHANDLE theuberoverlord
Message from Skype(0): USERSTATUS ONLINE
USER STATUS AWAY
Message from Skype(0): ERROR 2 Unknown command
If you dropped that message on the floor Skype would disconnect you. You also should have logic in place that if Skype did disconnect you, you auto-reconnect.
Try using this small utlity to see what the message flow should be like:
http://forum.skype.com/viewtopic.php?t=54549
Also please read this:
https://developer.skype.com/Docs/ApiDoc/Usi..._API_on_Windows
Quote:
If the API client spends more than 1 second processing a message, the connection is disconnected. Use the PING command to test the connection status. To ease debugging during development, in regedit enter the key APITimeoutDisabled (DWORD value, 0 = timeout enabled 1 = timeout disabled) into the HKCUSoftwareSkypePhoneUI file in the registry to override the 1 second timeout.
It Would seem because you did not repond to the error message, Skype disconnected you.
Look at the source of the utility I gave a link and see what the message loop does, you can view it also when it runs. At least this gives you something to compare too.