212 |
|
%token MAX_IDENT |
213 |
|
%token MAX_LOCAL |
214 |
|
%token MAX_NICK_CHANGES |
215 |
+ |
%token MAX_NICK_LENGTH |
216 |
|
%token MAX_NICK_TIME |
217 |
|
%token MAX_NUMBER |
218 |
|
%token MAX_TARGETS |
219 |
+ |
%token MAX_TOPIC_LENGTH |
220 |
|
%token MAX_WATCH |
221 |
|
%token MESSAGE_LOCALE |
222 |
|
%token MIN_NONWILDCARD |
446 |
|
serverinfo_item: serverinfo_name | serverinfo_vhost | |
447 |
|
serverinfo_hub | serverinfo_description | |
448 |
|
serverinfo_network_name | serverinfo_network_desc | |
449 |
< |
serverinfo_max_clients | serverinfo_ssl_dh_param_file | |
449 |
> |
serverinfo_max_clients | serverinfo_max_nick_length | |
450 |
> |
serverinfo_max_topic_length | serverinfo_ssl_dh_param_file | |
451 |
|
serverinfo_rsa_private_key_file | serverinfo_vhost6 | |
452 |
|
serverinfo_sid | serverinfo_ssl_certificate_file | |
453 |
|
serverinfo_ssl_client_method | serverinfo_ssl_server_method | |
767 |
|
ServerInfo.max_clients = $3; |
768 |
|
}; |
769 |
|
|
770 |
+ |
serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';' |
771 |
+ |
{ |
772 |
+ |
if (conf_parser_ctx.pass != 2) |
773 |
+ |
break; |
774 |
+ |
|
775 |
+ |
if ($3 < 9) |
776 |
+ |
{ |
777 |
+ |
conf_error_report("max_nick_length too low, setting to 9"); |
778 |
+ |
ServerInfo.max_nick_length = 9; |
779 |
+ |
} |
780 |
+ |
else if ($3 > NICKLEN) |
781 |
+ |
{ |
782 |
+ |
char buf[IRCD_BUFSIZE]; |
783 |
+ |
|
784 |
+ |
snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN); |
785 |
+ |
conf_error_report(buf); |
786 |
+ |
ServerInfo.max_nick_length = NICKLEN; |
787 |
+ |
} |
788 |
+ |
else |
789 |
+ |
ServerInfo.max_nick_length = $3; |
790 |
+ |
}; |
791 |
+ |
|
792 |
+ |
serverinfo_max_topic_length: MAX_TOPIC_LENGTH '=' NUMBER ';' |
793 |
+ |
{ |
794 |
+ |
if (conf_parser_ctx.pass != 2) |
795 |
+ |
break; |
796 |
+ |
|
797 |
+ |
if ($3 < 80) |
798 |
+ |
{ |
799 |
+ |
conf_error_report("max_topic_length too low, setting to 80"); |
800 |
+ |
ServerInfo.max_topic_length = 80; |
801 |
+ |
} |
802 |
+ |
else if ($3 > TOPICLEN) |
803 |
+ |
{ |
804 |
+ |
char buf[IRCD_BUFSIZE]; |
805 |
+ |
|
806 |
+ |
snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN); |
807 |
+ |
conf_error_report(buf); |
808 |
+ |
ServerInfo.max_topic_length = TOPICLEN; |
809 |
+ |
} |
810 |
+ |
else |
811 |
+ |
ServerInfo.max_topic_length = $3; |
812 |
+ |
}; |
813 |
+ |
|
814 |
|
serverinfo_hub: HUB '=' TBOOL ';' |
815 |
|
{ |
816 |
|
if (conf_parser_ctx.pass == 2) |