peerFixNick

GameSpy SDK

peerFixNick

Repairs an illegal chat nickname. Removes illegal characters from a nickname as well as invalid character combinations.

void peerFixNick(
gsi_char * newNick,
const gsi_char * oldNick );
RoutineRequired HeaderDistribution
peerFixNick<peer.h>SDKZIP

Parameters

newNick
[out] Corrected nickname. May be the same as oldNick if no issues are detected.
oldNick
[in] The nickname to be corrected or verified.

Remarks

The peerFixNick function replaces illegal characters in the nickname with the underscore ("_") character. This function will also replace leading numbers and illegal whitespace combinations. Because of the possibility of an underscore being added to the beginning, newNick should be able to hold at least one character more than oldNick.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerFixNickpeerFixNickApeerFixNickW

peerFixNickW and peerFixNickA are UNICODE and ANSI mapped versions of peerFixNick. The arguments of peerFixNickA are ANSI strings; those of peerFixNickW are wide-character strings.

Section Reference: Gamespy Peer SDK