I believe
override_only has nothing to do with your question here. Setting that parameter to true just means it won't search "generic_admin" as both a command and override but rather just the override.
Needless to say, root admins have the generic admin flag, b, too, so CheckCommandAccess here will return true.
I'd also point out that your code reads as: if CCA is true then return true, if false return false. Therefore you can shorten your code to:
PHP Code:
return CheckCommandAccess(client, "generic_admin", ADMFLAG_GENERIC);
Note you can also set override_only to true if you intend
generic_admin to be just an override, and not a command.
__________________