diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-02 15:42:43 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-02 15:42:43 +0200 |
commit | 96a3481b69bb21a757ad1d225ccdc2a18a218023 (patch) | |
tree | 0f130e9248a44f5bd4958479ffacbf7d75d947cf /src/plugins/irc/irc-config.c | |
parent | 40ec612e731f0ebbf7a7121d0f542e1996c99da3 (diff) | |
download | weechat-96a3481b69bb21a757ad1d225ccdc2a18a218023.zip |
Add constants for config file read/write/set/unset callbacks
Diffstat (limited to 'src/plugins/irc/irc-config.c')
-rw-r--r-- | src/plugins/irc/irc-config.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index bd30bec2f..5907e0ffb 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -454,7 +454,7 @@ irc_config_reload (void *data, struct t_config_file *config_file) rc = weechat_config_reload (config_file); - if (rc == 0) + if (rc == WEECHAT_CONFIG_READ_OK) irc_config_reload_servers_from_config (1); ptr_server = irc_servers; @@ -698,7 +698,7 @@ irc_config_server_create_option (void *data, struct t_config_file *config_file, /* make C compiler happy */ (void) data; - rc = 0; + rc = WEECHAT_CONFIG_OPTION_SET_ERROR; if (option_name) { @@ -753,7 +753,7 @@ irc_config_server_create_option (void *data, struct t_config_file *config_file, index_option, ptr_option); } - rc = 1; + rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; } } } @@ -763,7 +763,7 @@ irc_config_server_create_option (void *data, struct t_config_file *config_file, } } - if (rc == 0) + if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR) { weechat_printf (NULL, _("%s%s: error creating server option \"%s\""), @@ -1062,9 +1062,6 @@ irc_config_init () /* * irc_config_read: read IRC configuration file - * return: 0 = successful - * -1 = configuration file file not found - * -2 = error in configuration file */ int @@ -1075,8 +1072,6 @@ irc_config_read () /* * irc_config_write: write IRC configuration file - * return: 0 if ok - * < 0 if error */ int |