mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
core: add a welcome message on first WeeChat run (closes #318)
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-infolist.h"
|
||||
@@ -2358,7 +2359,11 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
|
||||
/* create file with default options if it does not exist */
|
||||
if (access (filename, F_OK) != 0)
|
||||
{
|
||||
if (strcmp (config_file->name, WEECHAT_CONFIG_NAME) == 0)
|
||||
weechat_first_start = 1;
|
||||
config_file_write_internal (config_file, 1);
|
||||
}
|
||||
|
||||
/* read config file */
|
||||
config_file->file = fopen (filename, "r");
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
int weechat_debug_core = 0; /* debug level for core */
|
||||
char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/
|
||||
int weechat_upgrading = 0; /* =1 if WeeChat is upgrading */
|
||||
int weechat_first_start = 0; /* first start of WeeChat? */
|
||||
time_t weechat_first_start_time = 0; /* start time (used by /uptime cmd) */
|
||||
int weechat_upgrade_count = 0; /* number of /upgrade done */
|
||||
struct timeval weechat_current_start_timeval; /* start time used to display */
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
extern int weechat_debug_core;
|
||||
extern char *weechat_argv0;
|
||||
extern int weechat_upgrading;
|
||||
extern int weechat_first_start;
|
||||
extern time_t weechat_first_start_time;
|
||||
extern struct timeval weechat_current_start_timeval;
|
||||
extern int weechat_upgrade_count;
|
||||
|
||||
Reference in New Issue
Block a user