- last_section = ""; found = 0;
- sets = settings_get_sorted();
- for (tmp = sets; tmp != NULL; tmp = tmp->next) {
- SETTINGS_REC *rec = tmp->data;
-
- if (((clear || set_default || *value != '\0') && g_strcasecmp(rec->key, key) != 0) ||
- (*value == '\0' && *key != '\0' && stristr(rec->key, key) == NULL))
- continue;
-
- if (strcmp(last_section, rec->section) != 0) {
- /* print section */
- printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
- TXT_SET_TITLE, rec->section);
- last_section = rec->section;
- }
-
- if (clear || set_default || *value != '\0') {
+ if (!(clear || set_default || *value != '\0'))
+ set_print_pattern(key);
+ else {
+ rec = settings_get_record(key);
+ if (rec != NULL) {