Geoip: Update documentation.

This commit is contained in:
Arkshine 2014-08-01 00:58:02 +02:00
parent 674600bab2
commit 17e0ab99e6

View File

@ -25,50 +25,58 @@
#pragma library geoip #pragma library geoip
#endif #endif
/// IP addresses passed to these natives can contain ports, the ports will be ignored. /**
* @global IP addresses passed to these natives can contain ports, the ports will be ignored.
*/
/** /**
* Lookup the two character country code for a given IP address. * Look up the two character country code for a given IP address.
* e.g: "US", "CA", etc. * e.g: "US", "CA", etc.
* *
* @param ip The IP address to lookup. * @param ip The IP address to lookup.
* @param result The result buffer. If the lookup does not succeed, the buffer is not modified. * @param result The result buffer. If the lookup does not succeed, the buffer is not modified.
*
* @return true on a successful lookup, false on a failed lookup. * @return true on a successful lookup, false on a failed lookup.
*/ */
native bool:geoip_code2_ex(const ip[], result[3]); native bool:geoip_code2_ex(const ip[], result[3]);
/** /**
* Lookup the three character country code for a given IP address. * Look up the three character country code for a given IP address.
* e.g: "USA", "cAN", etc. * e.g: "USA", "cAN", etc.
* *
* @param ip The IP address to lookup. * @param ip The IP address to lookup.
* @param result The result buffer. If the lookup does not succeed, the buffer is not modified. * @param result The result buffer. If the lookup does not succeed, the buffer is not modified.
*
* @return true on a successful lookup, false on a failed lookup. * @return true on a successful lookup, false on a failed lookup.
*/ */
native bool:geoip_code3_ex(const ip[], result[4]); native bool:geoip_code3_ex(const ip[], result[4]);
/** /**
* @deprecated
* Lookup the two character country code for a given IP address. * Lookup the two character country code for a given IP address.
* *
* @note This native will overflow the buffer by one cell on an unknown ip lookup! * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup!
* @note Use geoip_code2_ex instead! * Use geoip_code2_ex instead.
* *
* @param ip The IP address to lookup. * @param ip The IP address to lookup.
* @param result The result buffer. * @param result The result buffer.
*
* @return 1 on a successful lookup, 0 otherwise.
*/ */
//#pragma deprecated Use geoip_code2_ex() instead.
native geoip_code2(const ip[], ccode[3]); native geoip_code2(const ip[], ccode[3]);
/** /**
* @deprecated
* Lookup the three character country code for a given IP address. * Lookup the three character country code for a given IP address.
* *
* @note This native will overflow the buffer by one cell on an unknown ip lookup! * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup!
* @note Use geoip_code3_ex instead! * Use geoip_code3_ex instead.
* *
* @param ip The IP address to lookup. * @param ip The IP address to lookup.
* @param result The result buffer. * @param result The result buffer.
*
* @return 1 on a successful lookup, 0 otherwise.
*/ */
//#pragma deprecated Use geoip_code3() instead.
native geoip_code3(const ip[], result[4]); native geoip_code3(const ip[], result[4]);
/** /**
@ -83,6 +91,8 @@ native geoip_code3(const ip[], result[4]);
* -1: the default language, which is english. * -1: the default language, which is english.
* 0: the server language. You can use LANG_SERVER define. * 0: the server language. You can use LANG_SERVER define.
* >=1: the player's language. * >=1: the player's language.
*
* @return The result length on successful lookup, 0 otherwise.
*/ */
native geoip_country(const ip[], result[], len, id = -1); native geoip_country(const ip[], result[], len, id = -1);