MCPcopy Create free account
hub / github.com/ddnet/ddnet / ValidateIdentifier

Function ValidateIdentifier

src/engine/client/serverbrowser.cpp:281–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281static bool ValidateIdentifier(const char *pId, size_t MaxLength, const char *pContext, IConsole *pConsole)
282{
283 if(!ValidIdentifier(pId, MaxLength))
284 {
285 char aError[32 + IConsole::CMDLINE_LENGTH];
286 str_format(aError, sizeof(aError), "%s '%s' is not valid", pContext, pId);
287 pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "serverbrowser", aError);
288 return false;
289 }
290 return true;
291}
292
293bool CServerBrowser::ValidateCommunityId(const char *pCommunityId) const
294{

Callers 3

ValidateCommunityIdMethod · 0.85
ValidateCountryNameMethod · 0.85
ValidateTypeNameMethod · 0.85

Calls 3

ValidIdentifierFunction · 0.85
str_formatFunction · 0.85
PrintMethod · 0.45

Tested by

no test coverage detected