MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ACLGetCommandCategoryFlagByName

Function ACLGetCommandCategoryFlagByName

src/acl.cpp:217–224  ·  view source on GitHub ↗

Given the category name the command returns the corresponding flag, or * zero if there is no match. */

Source from the content-addressed store, hash-verified

215/* Given the category name the command returns the corresponding flag, or
216 * zero if there is no match. */
217uint64_t ACLGetCommandCategoryFlagByName(const char *name) {
218 for (int j = 0; ACLCommandCategories[j].flag != 0; j++) {
219 if (!strcasecmp(name,ACLCommandCategories[j].name)) {
220 return ACLCommandCategories[j].flag;
221 }
222 }
223 return 0; /* No match. */
224}
225
226/* Method for pattern comparison used for the user->patterns list
227 * so that we can search for items with listSearchKey(). */

Callers 4

aclCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected