struct auth_info* acl_get_access_info(struct hub_info* hub, const char* name) { struct auth_info* info = 0; info = (struct auth_info*) hub_malloc(sizeof(struct auth_info)); if (plugin_auth_get_user(hub, name, info) != st_allow) { hub_free(info); return NULL; } return info; }
struct auth_info* acl_get_access_info(struct hub_info* hub, const char* name) { struct auth_info* info = 0; #ifdef PLUGIN_SUPPORT info = (struct auth_info*) hub_malloc(sizeof(struct auth_info)); if (plugin_auth_get_user(hub, name, info) != st_allow) { hub_free(info); return NULL; } return info; #else info = (struct auth_info*) list_get_first(hub->acl->users); while (info) { if (strcasecmp((char*)info->nickname, name) == 0) { return info; } info = (struct auth_info*) list_get_next(hub->acl->users); } return NULL; #endif }