diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-28 17:54:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-28 17:54:13 +0000 |
commit | bd6fe052bce57849a7a850c0c5bee0ad896b9460 (patch) | |
tree | 95f3cb743874913a6dc1ff1314264b88989a4b60 /src/perl/common/Settings.xs | |
parent | 9c18cb00e7d096e46f5853f802724da4c59c2857 (diff) | |
download | irssi-bd6fe052bce57849a7a850c0c5bee0ad896b9460.zip |
Added time, size and level setting types. Breaks some settings - I'll add
automatic converter to these settings later. Meanwhile you CVS users can
fix your config files yourself :)
Time settings allow using "days", "hours", "minutes", "seconds" and
"milliseconds" or several of their abbreviations. For example "5d 4h
5msecs".
Size settings allow using "gbytes", "mbytes", "kbytes" and "bytes" or their
abbrevations. For example "5MB".
Level settings are currently handled pretty much the way they were before.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3080 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common/Settings.xs')
-rw-r--r-- | src/perl/common/Settings.xs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/perl/common/Settings.xs b/src/perl/common/Settings.xs index a7c5e6f6..f545befd 100644 --- a/src/perl/common/Settings.xs +++ b/src/perl/common/Settings.xs @@ -99,6 +99,21 @@ settings_set_bool(key, value) char *key int value +int +settings_set_time(key, value) + char *key + char *value + +int +settings_set_level(key, value) + char *key + char *value + +int +settings_set_size(key, value) + char *key + char *value + void settings_add_str(section, key, def) char *section @@ -127,6 +142,33 @@ CODE: settings_add_bool_module(MODULE_NAME"/scripts", section, key, def); void +settings_add_time(section, key, def) + char *section + char *key + char *def +CODE: + perl_settings_add(key); + settings_add_time_module(MODULE_NAME"/scripts", section, key, def); + +void +settings_add_level(section, key, def) + char *section + char *key + char *def +CODE: + perl_settings_add(key); + settings_add_level_module(MODULE_NAME"/scripts", section, key, def); + +void +settings_add_size(section, key, def) + char *section + char *key + char *def +CODE: + perl_settings_add(key); + settings_add_size_module(MODULE_NAME"/scripts", section, key, def); + +void settings_remove(key) char *key CODE: |