Protocols/MSNP/Commands/FND: Difference between revisions

From NINA Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{Protocols/MSNP}}
= FND =
= FND =
This command queries the Hotmail member directory and returns matching users.
This command queries the Hotmail member directory and returns matching users.

Latest revision as of 18:41, 11 May 2022

MSNP Protocol
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)

FND

This command queries the Hotmail member directory and returns matching users.

Since (at least) MSNP7 this command is no-longer supported and the server returns error 502. It is included here for historical reasons. The command was first seen in MSNP2 and used up to MSNP4 at the earliest. Its status in MSNP5 through 7 is unknown.

Sent to Server

Description

>>> FND trId fname=<firstName> lname=<lastName> city=<city> state=<state> country=<country>

Parameters

Note that parameters are given in key/vale pairs. All parameters except firstName and lastName can be set to the asterisk wildcard, otherwise the server will sent a 201 error. If either the city or state parameters are set (not asterisks) then the country must be US (at the time the member directory did not provide specific geographical information for non-US residents), otherwise the server will disconnect the client.

Name Type Example Value Summary
trid Transaction ID 1
firstName URL-Encoded String Bill First name of the person to find. Cannot be asterisk or get 201 error.
lastName URL-Encoded String Gates Last name of the person to find. Cannot be asterisk or get 201 error.
city URL-Encoded String * or Seattle City of the person to find, or an asterisk to match any city in the US (set to * for non-US locations or be disconnected)
state Two-letter US state code * or WA State of the person to find, or an asterisk to match any state in the US (set to * for non-US locations or be disconnected)
country Two-letter ISO country code * or US Country of the person to find, or an asterisk to match any country.

Server returns

Description

If too many results:

<<< 301 <trid>

If zero results:

>>> FND <trid> 0 0

If results found:

>>> FND <trid> <idx> <total> fname=<firstName> lname=<lastName> state=<state> country=<country>

The result row is repeated for each user found, with <idx> increasing from 1 to <total>.

Parameters

Name Type Example Value Summary
trid Transaction ID 1 The trid is identical and repeated for each returned result
idx Integer 1 idx starts at 1 and increments for each returned result until it is equal to the total value
total Integer 1 The total number of users returned

The other parameters are self-explanatory and identical to their meaning in the Client-to-server command definition. They are all URL-encoded.

Example

>>> FND 3 fname=William%20Henry lname=Gates city=* state=WA country=US
<<< FND 3 1 3 fname=William%20Henry lname=Gates city=Olympia state=WA country=US
<<< FND 3 2 3 fname=William%20Henry lname=Gates city=Seattle state=WA country=US
<<< FND 3 3 3 fname=William%20Henry lname=Gates city=Redmond state=WA country=US

Old Notes

You can try to find people on MSN with the FND command, though this has been largely superceded by the MSN Memeber Directory in recent years. FND has a TrID and five parameters. For some reason, all of the parameters to FND have a key=value format, for example fname=Mike or lname=Mintz.

  • The first parameter is fname=<First name>. If you set the value of fname to *, the server will return error 201.
  • The second parameter is lname=<Last name>. If you set the value of lname to *, the server will return error 201.
  • The third parameter is city=<City>. Only major US cities are allowed.
  • The fourth parameter is state=<U.S. state>. This is a two-letter code for a US state.
  • The fifth parameter is country=<Country>. This is the two letter ISO country code.

city, state, or country can be set to *, meaning "any". If you specify a country other than US, you must set city and state to *, or you will be disconnected.

There is an (as yet unknown) maximum number of matches allowed on a query. If a search has more than the maximum number of matches, the server will return error 301. Otherwise, it will return a series of matches, one per command. The matches have 6 arguments: an incrementing number, a total number, first name, last name, city, state, and country of an individual match. Here are some examples.

>>> FND 3 fname=Bill lname=Gates city=* state=* country=US\r\n
<<< 301 3\r\n

>>> FND 3 fname=Mike lname=Mintz city=* state=* country=DE\r\n
<<< FND 3 0 0\r\n

>>> FND 9 fname=Mike lname=Mintz city=* state=* Country=US\r\n
<<< FND 9 1 3 fname=Mike lname=Mintz State=Alaska Country=US\r\n
    FND 9 2 3 fname=Mike lname=Mintz State=South%20Dakota Country=US\r\n
    FND 9 3 3 fname=Mike lname=Mintz State=Oklahoma Country=US\r\n