diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-01-27 10:48:29 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-01-27 10:48:29 +0100 |
commit | ad414865430d2d073689f849283a10b06711f1b8 (patch) | |
tree | 46c12eff476081782dc6322068bc7630ba4e94a9 /src/plugins/alias/alias.c | |
parent | ed26a0389c06250f02329fa477d2cffe7df59b5e (diff) | |
download | weechat-ad414865430d2d073689f849283a10b06711f1b8.zip |
Added config file functions in plugins API, improved /reload and /save commands (now possible to reload/save some files only), fixed completion bug
Diffstat (limited to 'src/plugins/alias/alias.c')
-rw-r--r-- | src/plugins/alias/alias.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 9267f5d7a..8655b5519 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -420,9 +420,10 @@ alias_free_all () */ int -alias_config_reload (struct t_config_file *config_file) +alias_config_reload (void *data, struct t_config_file *config_file) { /* make C compiler happy */ + (void) data; (void) config_file; alias_free_all (); @@ -434,10 +435,11 @@ alias_config_reload (struct t_config_file *config_file) */ void -alias_config_read_line (struct t_config_file *config_file, char *option_name, - char *value) +alias_config_read_line (void *data, struct t_config_file *config_file, + char *option_name, char *value) { /* make C compiler happy */ + (void) data; (void) config_file; if (option_name && value) @@ -460,11 +462,14 @@ alias_config_read_line (struct t_config_file *config_file, char *option_name, */ void -alias_config_write_section (struct t_config_file *config_file, +alias_config_write_section (void *data, struct t_config_file *config_file, char *section_name) { struct t_alias *ptr_alias; + /* make C compiler happy */ + (void) data; + weechat_config_write_line (config_file, section_name, NULL); for (ptr_alias = alias_list; ptr_alias; @@ -482,9 +487,13 @@ alias_config_write_section (struct t_config_file *config_file, */ void -alias_config_write_default_aliases (struct t_config_file *config_file, +alias_config_write_default_aliases (void *data, + struct t_config_file *config_file, char *section_name) { + /* make C compiler happy */ + (void) data; + weechat_config_write_line (config_file, section_name, NULL); weechat_config_write_line (config_file, "SAY", "%s", "\"msg *\""); @@ -524,14 +533,17 @@ alias_config_init () struct t_config_section *ptr_section; alias_config_file = weechat_config_new (ALIAS_CONFIG_FILENAME, - &alias_config_reload); + &alias_config_reload, NULL); if (!alias_config_file) return 0; ptr_section = weechat_config_new_section (alias_config_file, "alias", - alias_config_read_line, - alias_config_write_section, - alias_config_write_default_aliases); + &alias_config_read_line, + NULL, + &alias_config_write_section, + NULL, + &alias_config_write_default_aliases, + NULL); if (!ptr_section) { weechat_config_free (alias_config_file); |