1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

Added string length limit for setup file options

This commit is contained in:
Sebastien Helleu
2007-08-29 12:53:35 +00:00
parent ebae0cb7d5
commit 882b72cd0c
14 changed files with 601 additions and 369 deletions
+13 -1
View File
@@ -3878,7 +3878,19 @@ weechat_cmd_set (t_irc_server *server, t_irc_channel *channel,
weechat_options[last_section][last_option].default_string : _("empty"));
break;
case OPTION_TYPE_STRING:
gui_printf (NULL, _(" . type string (any string)\n"));
switch (weechat_options[last_section][last_option].max)
{
case 0:
gui_printf (NULL, _(" . type string (any string)\n"));
break;
case 1:
gui_printf (NULL, _(" . type: char (any char)\n"));
break;
default:
gui_printf (NULL, _(" . type string (any string, limit: %d chars)\n"),
weechat_options[last_section][last_option].max);
break;
}
gui_printf (NULL, _(" . default value: '%s'\n"),
(weechat_options[last_section][last_option].default_string) ?
weechat_options[last_section][last_option].default_string : _("empty"));