Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/commands.c @ 2265:b79a34e21076
do_say(): Do not display password value
author | Egor Kovetskiy <e.kovetskiy@gmail.com> |
---|---|
date | Wed, 04 May 2016 11:38:19 +0600 |
parents | bbed6973987a |
children | bdee1ede7572 |
comparison
equal
deleted
inserted
replaced
2264:44bb9a033407 | 2265:b79a34e21076 |
---|---|
2339 } | 2339 } |
2340 // Print out list of options | 2340 // Print out list of options |
2341 format = g_strdup_printf("%%-%us = [%%s]", (unsigned)max); | 2341 format = g_strdup_printf("%%-%us = [%%s]", (unsigned)max); |
2342 for (lel = list; lel; lel = lel->next) { | 2342 for (lel = list; lel; lel = lel->next) { |
2343 const gchar *key = lel->data; | 2343 const gchar *key = lel->data; |
2344 scr_LogPrint(LPRINT_NORMAL, format, key, settings_opt_get(key)); | 2344 if (g_ascii_strncasecmp(key, "password", 8) != 0) |
2345 scr_LogPrint(LPRINT_NORMAL, format, key, settings_opt_get(key)); | |
2345 } | 2346 } |
2346 g_free(format); | 2347 g_free(format); |
2347 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE); | 2348 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE); |
2348 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE, | 2349 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE, |
2349 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max); | 2350 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max); |
2359 return; | 2360 return; |
2360 } | 2361 } |
2361 option_utf8 = to_utf8(option); | 2362 option_utf8 = to_utf8(option); |
2362 g_free(option); | 2363 g_free(option); |
2363 if (!assign) { // This is a query | 2364 if (!assign) { // This is a query |
2364 const char *val = settings_opt_get(option_utf8); | 2365 const gchar *val = settings_opt_get(option_utf8); |
2365 if (val) | 2366 if (val) { |
2367 if (g_ascii_strncasecmp(option_utf8, "password", 8) == 0) | |
2368 val = NULL; | |
2366 scr_LogPrint(LPRINT_NORMAL, "%s = [%s]", option_utf8, val); | 2369 scr_LogPrint(LPRINT_NORMAL, "%s = [%s]", option_utf8, val); |
2367 else | 2370 } else { |
2368 scr_LogPrint(LPRINT_NORMAL, "Option %s is not set", option_utf8); | 2371 scr_LogPrint(LPRINT_NORMAL, "Option %s is not set", option_utf8); |
2372 } | |
2369 g_free(option_utf8); | 2373 g_free(option_utf8); |
2370 return; | 2374 return; |
2371 } | 2375 } |
2372 // Update the option | 2376 // Update the option |
2373 // Maybe some options should be protected when user is connected (server, | 2377 // Maybe some options should be protected when user is connected (server, |