+The network interface addresses are obtained using the Win32 GetIpAddrTable API call. They should be the actual interface IPs on the system, even if they are RFC1918 private addresses. The server most likely uses these addresses to determine if a connection can be directly initiated to the host, or if it must pass through some kind of NAT device.
+This message contains information on the buddy from their profile. Sometimes it
+is empty, sometimes it contains the following dictionary-encoded keys:
+
+Name | Type | Description
+---- | ---- | -----------
+Age | integer | Age in years
+AvatarURL | string | URL of avatar
+BandName | string |
+SongName | string |
+ContactType | integer | 2
+DisplayName | string |
+Gender | string | M or F
+Headline | string |
+ImageURL | string | URL of JPEG image on MySpace Content Distribution Network
+IMName | string | Instant messaging name, blank if user doesn't have MySpaceIM
+UserName | string |
+RoomLastLogin | integer |
+Location | string | city, state, country
+ShowAvatar | boolean | True or False
+
+Example:
+
+```plain
+\bm\124\f\78744676\msg\Age=27AvatarUrl=BandName=cold war kidsContactType=2DisplayName=MySpaceIMGender=FHeadline=ImageURL=http:/1/1a895.ac- images.myspacecdn.com/101111/149/186/11111986894_m.jpgIMName=MySpaceIM Chat RoomLastLogin=128287884600000000Location=SANTA MONICA, California, USShowAvatar=FalseSongName=Hang Me Up To DryTotalFriends=119814UserName=myspaceim\final\
+```
+
+## Set Status Messages
+
+To change your own status:
+
+Key | Type | Description
+--- | ---- | -----------
+status | integer | Status code.
+sesskey | integer | Session key.
+statstring | string | User-settable status message (for online or away).
+locstring | string | Location string? Sometimes "userinfo;"
+
+Status codes:
+
+Code | Description
+---- | -----------
+0 | Hidden/offline
+1 | Online
+2 | Idle
+5 | Away
+
+Unknown codes (tested 3, 4, and 6) are recognized as offline by the official
+client.
+
+Same code as in incoming status messages.
+
+## Keepalives
+
+From server:
+
+Key | Type | Description
+--- | ---- | -----------
+ka | boolean | Presence indicates this is a keepalive message.
+
+Sent every 3 minutes to keep connection alive.
+
+## Add Buddy
+
+*msim_add_buddy*
+
+Key | Type | Description
+--- | ---- | -----------
+addbuddy | boolean | Presence indicates to add buddy.
+sesskey | integer | Session key.
+newprofileid | integer | Userid to add.
+reason | text | Empty
+
+The client also sends a persist message to update the buddy list. Example
+sequence (after looked up userid), adding uid 6221:
+* \persist\1\sesskey\420159774\cmd\514\dsn\0\uid\180301984\lid\9\rid\31\body\ContactID=6221.GroupName=IM Friends.Position=1000.Visibility=1.NameSelect=0\final\ - update contact info
+
+Errors:
+
+Code | Message | Type
+---- | ------- | ----
+1539 | The profile requested is already a buddy. | Non-fatal
+
+## Delete Buddy
+
+*msim_remove_buddy*
+
+Key | Type | Description
+--- | ---- | -----------
+delbuddy | boolean | Presence indicates to delete buddy.
+sesskey | integer | Session key.
+delprofileid | integer | Userid of buddy to delete.
+
+The client also sends a persist message and updates the block list when deleting a buddy. Example message sequence:
+
+* \delbuddy\\sesskey\97309878\delprofileid\175349942\final\ - delete buddy with numeric ID 175349942
+* \persist\1\sesskey\97309878\cmd\515\dsn\0\uid\3656574\lid\8\rid\18\body\ContactID=175349942\final\ - delete from on-server buddy list?
+* \blocklist\\sesskey\97309878\idlist\a-|175349942|b-|175349942\final\ - update block list; remove user (-) from accept (a) and block (b) list?
+
+## Block List
+
+*msim_add_buddy updates the blocklist, not implemented: User-settable
+blocklists.*
+
+Key | Type | Description
+--- | ---- | -----------
+blocklist | boolean | Presence indicates to change block list.
+sesskey | integer | Session key.
+idlist | list | Encoded list of buddies to block/unblock, see below.
+
+`idlist` is constructed from one of the following format strings:
+
+* a-|%lu|b-|%lu
+* a-|%lu|b+|%lu - block userid %lu
+* b-|%lu|a+|%lu - unblock userid %lu
+
+where %lu is the userid. Current guess is that a is for accept list, b is for
+block list, - removes and + adds, but this has not been proven. Example idlist,
+when "Who can contact me: Anyone" and "Who can see when I'm online: Anyone" is
+set:
+
+* w0|c0|a-|*|b-|*|b+|blockeduser1...
+
+Removes all users from accept list and block list, then adds blockeduser1
+(userid).
+
+If "Who can contact me: Only people on my Contact List" and "Who can see when
+I'm online: Anyone", then idlist is:
+
+* w0|c1|a-|*|a+|buddy1|buddy2|...|buddyN|b-|*
+
+where buddyN is the userid of each buddy on the contact list. |a-|*| removes
+all users from the accept list, |a+|...| adds only buddies to accept list,
+|b-|* removes all buddies from blocklist.
+
+Opcodes:
+
+* w# = Who can see when I'm online? 0=Anyone, 1=Only people on my contact list
+* c# = Who can contact me? 0=Anyone, 1=Only people on my contact list
+* a- = remove from accept list
+* a+ = add to accept list
+* b- = remove from block list
+* b+ = add to block list
+* \* = all userids
+
+## Get Info
+
+Key | Type | Description
+--- | ---- | -----------
+getinfo | boolean | Presence indicates that this is a get info request.
+sesskey | integer | Session key.
+uid | integer | Userid to look up.
+
+Examples:
+
+```
+\getinfo\\sesskey\53348262\uid\6221\final\
+```
+
+```
+\getinfo\\sesskey\70517308\uid\180301984\final\
+```
+
+Specifics of this message's purpose are unknown.
+
+See also the 1,0,2 persist message (they're often sent together).
+
+## Set Info
+
+Key | Type | Description
+--- | ---- | -----------
+setinfo | boolean | Presence indicates that this is a get info request.
+sesskey | integer | Session key.
+info | dictionary | Packed dictionary of information to set.
+
+'info' dictionary has same fields as setinfo. Examples:
+
+```
+\setinfo\\sesskey\70517308\info\Age=20AvatarUrl=BandName=ContactType=1DisplayName=MySpaceIM Protocol Plugin for PidginGender=MImageURL=http:/1/1a513.ac-images.myspacecdn.com/1images01/118/1m_0ad6cfe1ae4b676622e98c6d4cb3cef0.pngLastLogin=128290072800000000Location=California, USShowAvatar=FalseSongName=TotalFriends=4UserName=msimprpl\final\
+```
+
+```
+\setinfo\\sesskey\70517308\info\Age=20AvatarUrl=BandName=ContactType=1DisplayName=MySpaceIM Protocol Plugin for PidginGender=MImageURL=http:/1/1a513.ac-images.myspacecdn.com/1images01/118/1m_0ad6cfe1ae4b676622e98c6d4cb3cef0.pngLastLogin=128290072800000000Location=California, USShowAvatar=FalseSongName=TotalFriends=4UserName=msimprpl\final\
+```
+
+## Web Challenge Request (webchlg)
+
+Key | Type | Description
+--- | ---- | -----------
+webchlg | boolean | Presence indicates a web challenge request.
+sesskey | integer | Session key.
+n | integer | 0, unknown.
+
+See also 1,17,26 persistance request.
+
+## Persist Messages
+
+*msim_process_reply*, *msim_new_reply_callback*
+
+Persist messages allow the client to send or request information to or from the server. Thanks to Nathan Peterson for reversing the structure of these commands.
+8 (weight 256) | Set indicates reply, clear indicates request.
+9 (weight 512) | Set indicates to an action, clear indicates to get information.
+10 (weight 1024) | Set indicates an error, clear is normal.
+
+So for example, a reply to 1,5,7 (lookup MySpace information by username/email) would have cmd,dsn,lid of 257,5,7, and a reply to 1,9,14 would be 258,9,14. These aren't listed separately in the list above because they're the same command.
+
+Server responds with a persistance reply (persistr):
+cmd | integer | Command. This appears to the client request cmd bitwise ANDed or added with 256.
+dsn | integer | Subcommand - matches dsn of request.
+lid | integer | Subcommand - matches lid of request.
+rid | integer | Request/response ID - matches rid of request. Server sends responses back with same rid as in the client's request, allowing client to match responses to requests.
+UserName | text | Unique username. Present only if in request.
+Email | text | Email address. Present only if in request. Fields below only present if user exists.
+UserID | integer | Numeric user ID.
+ImageURL | text | URL to image
+DisplayName | text | Display name, need not be unique.
+BandName | text |
+SongName | text |
+Age | integer | Age in years.
+Gender | M/F | Gender.
+Location | text | City, State, Country
+!TotalFriends | integer | Total number of friends on MySpace.
+
+(Same as 1,5,7 reply but also has TotalFriends).
+
+Error messages are sent with cmd=1025 (error bit set), and following body:
+
+Key | Type | Description
+--- | ---- | -----------
+UserID | integer | Userid of message request which had the error.
+ErrorMessage | text | Textual description of error
+
+Observed error messages:
+
+* Request time elapsed configured has passed for MessageType: Read, DataType:
+ MySpaceUserInfo
+* Persistence Queue Overflow
+
+### 1,4,5: Lookup MySpace User Info About Yourself
+
+Seems to be the same as 1,4,3 but looks up your information. You still need to
+pass UserID=xxx in the request body.
+
+### 1,5,7: Lookup MySpace User Info by String
+
+*msim_lookup_user*, when called with a username
+
+Lookup user information by username or email. Known as MySpaceUserInfoByString
+in error messages.
+
+In the body dictionary of the request, one of these keys is present:
+
+Key | Values | Description
+--- | ------ | -----------
+UserName | text | The username to lookup.
+Email | text | The email address to lookup.
+
+Reply body:
+
+Key | Values | Description
+--- | ------ | -----------
+UserName | text | Unique username. Present only if in request.
+Email | text | Email address. Present only if in request. Fields below only present if user exists.
+UserID | integer | Numeric user ID.
+ImageURL | text | URL to image, mangled an unknown way.
+DisplayName | text | Display name, need not be unique.
+BandName | text |
+SongName | text |
+Age | integer | Age in years.
+Gender | M/F | Gender.
+Location | text | City, State, Country
+
+Error reply, here cmd=1025 (error bit set):
+
+Key | Type | Description
+--- | ---- | -----------
+UserName | integer | Username of message request which had the error.
+ErrorMessage | text | Textual description of error. Once observed: Request time elapsed configured has passed for MessageType: Read, DataType: MySpaceUserInfoByString
+
+### 1,7,18: Check Mail Status
+
+*msim_check_mail*, *msim_check_mail_cb*
+
+Checks for new mail, comments, or friend requests. You have to periodically
+The majority of this specification was produced from original research by
+User:Jeff
+
+Thanks also to Nathan Peterson for independently reverse-engineering parts of the protocol. Parts of this document were drawn from [it](http://myspaceim.pbwiki.com/).
+
+Thanks also to Scott Ellis, developer of the
+[MySpaceIM protocol plugin for Miranda IM](http://forums.miranda-im.org/showthread.php?p=122912),