1612 |
int server_found; |
int server_found; |
1613 |
char line[1024], *ptr_line, *pos, *pos2; |
char line[1024], *ptr_line, *pos, *pos2; |
1614 |
|
|
1615 |
filename_length = strlen (weechat_home) + |
filename_length = strlen (weechat_home) + strlen (WEECHAT_CONFIG_NAME) + 2; |
1616 |
strlen (WEECHAT_CONFIG_NAME) + 2; |
filename = (char *) malloc (filename_length * sizeof (char)); |
|
filename = |
|
|
(char *) malloc (filename_length * sizeof (char)); |
|
1617 |
if (!filename) |
if (!filename) |
1618 |
return -2; |
return -2; |
1619 |
snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME, |
snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME, |
1912 |
} |
} |
1913 |
|
|
1914 |
printf (_("%s: creating default config file...\n"), PACKAGE_NAME); |
printf (_("%s: creating default config file...\n"), PACKAGE_NAME); |
1915 |
wee_log_printf (_("Creating default config file\n")); |
weechat_log_printf (_("Creating default config file\n")); |
1916 |
|
|
1917 |
current_time = time (NULL); |
current_time = time (NULL); |
1918 |
fprintf (file, _("#\n# %s configuration file, created by " |
fprintf (file, _("#\n# %s configuration file, created by " |
2113 |
return -1; |
return -1; |
2114 |
} |
} |
2115 |
|
|
2116 |
wee_log_printf (_("Saving config to disk\n")); |
weechat_log_printf (_("Saving config to disk\n")); |
2117 |
|
|
2118 |
current_time = time (NULL); |
current_time = time (NULL); |
2119 |
fprintf (file, _("#\n# %s configuration file, created by " |
fprintf (file, _("#\n# %s configuration file, created by " |