Skip to content
Snippets Groups Projects
Commit 24ca5e76 authored by echicken's avatar echicken
Browse files

Supply default values in iniGetValue calls in init().

The max_paragraph* settings introduced by mcmlxxix in 1.34 would break
the bot for anyone who updated without adding these keys to ircbot.ini.
(max_paragraph_length was NaN, breaking String.slice in Server_writeout
of ircbot_functions.js.)
parent 0ea2fd4d
No related branches found
No related tags found
No related merge requests found
...@@ -62,15 +62,15 @@ function init() { ...@@ -62,15 +62,15 @@ function init() {
} }
command_prefix = command_prefix =
config.iniGetValue(null, "command_prefix"); config.iniGetValue(null, "command_prefix", "");
real_name = real_name =
config.iniGetValue(null, "real_name"); config.iniGetValue(null, "real_name", "");
config_write_delay=parseInt( config_write_delay=parseInt(
config.iniGetValue(null, "config_write_delay")); config.iniGetValue(null, "config_write_delay", 300));
max_paragraph_length = parseInt( max_paragraph_length = parseInt(
config.iniGetValue(null, "max_paragraph_length")); config.iniGetValue(null, "max_paragraph_length", 512));
max_paragraphs = parseInt( max_paragraphs = parseInt(
config.iniGetValue(null, "max_paragraphs")); config.iniGetValue(null, "max_paragraphs", 1));
// Squelch_List = // Squelch_List =
// config.iniGetValue(null, "Squelch_List").split(","); // config.iniGetValue(null, "Squelch_List").split(",");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment