defined and implemented why2_get_server_users_path
This commit is contained in:
parent
48412cae73
commit
11ddd9c9b9
@ -113,7 +113,7 @@ void why2_chat_init_server_config(void)
|
|||||||
|
|
||||||
//CHECK FOR USER CONFIG
|
//CHECK FOR USER CONFIG
|
||||||
char *user_pick_username = why2_chat_server_config("user_pick_username");
|
char *user_pick_username = why2_chat_server_config("user_pick_username");
|
||||||
char *config_path = why2_replace(WHY2_CONFIG_DIR "/" WHY2_CHAT_CONFIG_SERVER_USERS, "{USER}", getenv("USER"));
|
char *config_path = why2_get_server_users_path();
|
||||||
|
|
||||||
if (strcmp(user_pick_username, "true") == 0 && access(config_path, R_OK) != 0)
|
if (strcmp(user_pick_username, "true") == 0 && access(config_path, R_OK) != 0)
|
||||||
{
|
{
|
||||||
@ -146,3 +146,8 @@ char *why2_chat_client_config(char *key)
|
|||||||
{
|
{
|
||||||
return config(key, CLIENT);
|
return config(key, CLIENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *why2_get_server_users_path(void)
|
||||||
|
{
|
||||||
|
return why2_replace(WHY2_CONFIG_DIR "/" WHY2_CHAT_CONFIG_SERVER_USERS, "{USER}", getenv("USER"));
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user