Since March 10, 2003 - Version 2
hypothetic.org

MSN Messenger Protocol

Notification - Statuses

Back To Normal Layout

What are statuses?

Statuses represent a user's online state. A user can be online, or a user can be offline. There are also "sub-statuses": if a user is online, he or she might be available, away, busy, etc. "Appearing offline" is a special type of status, where a user appears to be offline to everyone, but is still connected to the NS and can receive notifications and make changes.

Everyone in your contact list, or more specifically, your allow list, can see your online status. You can see the status of everyone that has you in their allow list, and you will automatically receive the status of everyone in your forward list

Status Codes

Every status is represented by a three-letter status code. There are nine total status codes. Three of these are main statuses: online, offline, and hidden (appearing offline). The other six are all sub-statuses of the online status.

Main Statuses

Sub-Statuses

Setting Your Status

To set or change your status, send the CHG command with a TrID and the three letter status code as your status. The server will reply with a CHG with your TrID and your new status (it should look exactly like what you sent). If you send an invalid status code, the server will most likely disconnect you immediately. Because status codes are case sensitive, sending nln will result in the server closing the connection as well. Here are some examples of using the CHG command:

>>> CHG 12 NLN\r\n

<<< CHG 12 NLN\r\n

>>> CHG 13 HDN\r\n

<<< CHG 13 HDN\r\n

>>> CHG 15 AWY\r\n

<<< CHG 14 AWY\r\n

If you attempt to change your status too rapidly, you may receive error 800 in response to some CHGs.

Initial Status

After you send your final USR to the NS with your digested password, you should set your initial status. The official client always immediately sets the status to NLN, and any status is acceptable. You could make your client log in as HDN and nobody would even know that you logged in.

If you do not set your initial status, you will basically be considered HDN and can do everything you can do in that status. The only exception I have noticed is that you will not receive initial statuses or changes of status from users on your contact list.

Being FLN or HDN

Unlike a few years ago, you can no longer set your status to FLN. Even if you identify yourself with the VER command as using an older version, it still will not work. You will receive error 201 for invalid parameter.

You can however set your status to HDN, which means you are "appearing offline". To every other user, you will appear to be FLN, but you are still connected to the NS. You can do almost everything as normal on the NS: sync contact lists, change your friendly name, receive status notifications, etc. However, the only thing that you cannot do is request XFRs (transfers) to the SB, and you will never receive any RNGs. In other words, no chatting. If you do send an XFR, you will receive error 913.

Receiving Statuses

You will automatically receive the status of every user on your forward list when you first log on and when a status changes. Note that you only receive an online status if the user has you in his or her allow list.

Initial Statuses

After you send your initial status, you will receive the initial status of every online user on your forward list. Assume that every other user is offline. You will receive a list of ILN commands with the same TrID as your initial CHG. If no users are online, you will receive no ILNs. You don't ever know when the list of ILNs is complete: [FIND OFFICIAL CLIENT TIMEOUT]

Here is an example of receiving a list of online users:

>>> CHG 12 NLN\r\n

>>> PNG\r\n

<<< CHG 12 NLN\r\n

<<< ILN 12 AWY example@passport.com Mike\r\n

<<< ILN 12 NLN name_123@hotmail.com Name_123\r\n

<<< ILN 12 BSY myname@msn.com My%20Name\r\n

<<< QNG\r\n

Status Changes

Every time a user on your forward list changes his or her status, you will receive a notification with the new status. Of course, that is only true if you have sent your initial status. Otherwise, you don't get any status notifications.

You receive status notifications with two commands: NLN and FLN. Yes, those are three-letter commands as well as status codes. An NLN is sent when a user changes their state to one of the online states. This does not necessarily mean that the user has just signed on, it only means that the user has changed their status to either NLN or any of its sub-statuses. FLN is used when a user goes offline.

Note that a user doesn't actually have to change their status to a different status than what they were previously set to. A user can set themselves as BRB twenty times in a row, and you will receive all twenty NLN commands.

Also, whenever a user changes their friendly name, you will receive either an NLN or an FLN depending on whether they are online or [appearing] offline (obviously they cannot change their friendly name if they are truly offline). You will receive the new friendly name if it is an NLN command because the friendly name is one of the parameters, but if it is an FLN, you will not receive the new friendly name. That friendly name can only be updated when the user goes online next, or when you sync your lists next.

The syntax for both NLN and FLN are unusual because they are asynchronous (they are not in response to any client command previously sent). They do not have TrIDs. The NLN command has three parameters: the first is the three letter status code, the second is the user's account name, and the third is the user's friendly name. The syntax for FLN is much simpler; it just has one parameter, which is the user's account name.

Here are some examples of what you can receive from the server:

<<< NLN NLN example@passport.com Mike\r\n

<<< NLN AWY example@passport.com Mike\r\n

<<< NLN AWY example@passport.com Mike%20Changed%20His%20Name\r\n

<<< FLN example@passport.com\r\n

Copyright ©2002-2003 to Mike Mintz.
<http://www.mikemintz.com/>