DWC_CheckProfanityAsync

C Specification

#include <dwc.h>

BOOL DWC_CheckProfanityAsync(const u16 **words,
                             int wordsnum,
                             const char *reserved,
                             int timeout,
                             char *result,
                             int  *badwordsnum);

Description

Starts the process of checking for illegal character strings. This function always returns FALSE if called during a check for illegal character strings.

The check for illegal character strings is performed by communicating with the Authentication server. The content of the check is the same as that of the DWC_LoginAsync function.
Keep in mind that only the individual words get checked. The syntax and the sentence structure are not analyzed.
In addition to checking for individual illegal character strings, this function can check multiple strings at once, but with the following limitations:

After calling this function, proceed with the check for illegal character strings. Call the DWC_CheckProfanityProcess function about once every game frame If the process terminates successfully, the result of the check for illegal character strings gets stored as an array in result.

If the result is wrong, as compared to the string provided to words as the check target, the check result value stored in result will be 1. Otherwise, the stored value will be 0.

Example:
words[4] = { L"goodoword1", L"goodoword2", L"badword", L"goodoword3" }

If the check on this group of strings reveals that the 3rd string, badword, is illegal, the function will return the following:

result[4] = { 0, 0, 1, 0 }
badwordsnum = 1

Arguments

words Pointer to the string array which is being checked.
  • Use Unicode (little endian UTF16) for the character code.
    When using another type of character code, be sure to convert to Unicode.
  • If the original characters not included in Unicode or in the IPL font are used in the screen name, be sure to replace all such characters with spaces.
  • The terminal character should be "\0\0" (0x0000 in u16).
  • The total length of all the strings in the array must not exceed 501 characters (including the string termination characters).
wordsnum Number of elements in the character string array specified by words (1 to 50).
reserved Specifies NULL.
timeout The time (in milliseconds) to response timeout by the server.
(If a 0 is specified here, the default value of 10000 will be used.)
result Pointer to the location of storage for the check result. Must be a region of wordsnum bytes.
badwordsnum Pointer to the location of storage for the number of illegal characters included in the check result.

Return Values

TRUE The process of checking for illegal character strings has started.
FALSE The process of checking for illegal character strings failed to start.

See Also

DWC_CheckProfanityProcess, DWC_LoginAsync

Revision History

2007/03/16 Initial version.


CONFIDENTIAL