[[project @ 2005-01-12 06:01:01 by unknown_lamer] unknown_lamer**20050112060101 BotConfig fully implemented, set_config_value that takes one t_value instead of a t_value_list has been added for convinience ] { hunk ./ChangeLog 2 + + * source/BotConfig.C (read_config): Made to use set_option_value + instead of manipulating options_db directly + + * source/BotConfig.H (class BotConfig): Add set_option_value that + takes a t_value instead of t_value_list (most uss of + set_option_value will be to add a single value so this is very useful) + + * source/BotConfig.C (set_option_value): Implemented hunk ./source/BotConfig.C 59 - // This is broken because overwrites existing values hunk ./source/BotConfig.C 63 - options_db[command] = t_option_values (t_value_list (), - t_watcher_list ()); - options_db[command].first.push_back (params.rest ()); + set_option_value (command, params.rest (), true); hunk ./source/BotConfig.C 130 + key = Utils::to_upper (key); // keys are case insensitive hunk ./source/BotConfig.C 151 + +void +BotConfig::set_option_value (std::string key, t_value value, bool append) +{ + t_value_list value_list = t_value_list (); + value_list.push_front (value); + + set_option_value (key, value_list, append); +} hunk ./source/BotConfig.H 64 - + // Convinience proc + void set_option_value (std::string key, t_value value, bool append); }