peerTranslateNick

GameSpy SDK

peerTranslateNick

Removes the namespace extension from a nickname. Use this when working with unique nicknames in a public chat room.

const gsi_char *Ā peerTranslateNick(
gsi_char * nick,
const gsi_char * extension );
RoutineRequired HeaderDistribution
peerTranslateNick<peer.h>SDKZIP

Return Value

Returns the nickname, stripped of the namespace identifier.

Parameters

nick
[in] The current nickname.
extension
[in] The game extension, assigned by GameSpy. This will be removed from the nickname.

Remarks

The peerTranslateNick function is used to remove a namespace extension from a nickname. Nicknames that are registered in a gameā€™s namespace will include an indentifying extension, such as "-gspy". This extension should not be displayed to the user, but should be stripped before display.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerTranslateNickpeerTranslateNickApeerTranslateNickW

peerTranslateNickW and peerTranslateNickA are UNICODE and ANSI mapped versions of peerTranslateNick. The arguments of peerTranslateNickA are ANSI strings; those of peerTranslateNickW are wide-character strings.

Section Reference: Gamespy Peer SDK