/* ServerInfo.name is not rehashable */
/* ServerInfo.name = ServerInfo.name; */
ServerInfo.description = NULL;
- ServerInfo.network_name = rb_strdup(NETWORK_NAME_DEFAULT);
- ServerInfo.network_desc = rb_strdup(NETWORK_DESC_DEFAULT);
+ ServerInfo.network_name = NULL;
+ ServerInfo.network_desc = NULL;
memset(&ServerInfo.ip, 0, sizeof(ServerInfo.ip));
ServerInfo.specific_ipv4_vhost = 0;
AdminInfo.email = NULL;
AdminInfo.description = NULL;
- ConfigFileEntry.default_operstring = rb_strdup("is an IRC operator");
- ConfigFileEntry.default_adminstring = rb_strdup("is a Server Administrator");
- ConfigFileEntry.servicestring = rb_strdup("is a Network Service");
+ ConfigFileEntry.default_operstring = NULL;
+ ConfigFileEntry.default_adminstring = NULL;
+ ConfigFileEntry.servicestring = NULL;
ConfigFileEntry.default_umodes = UMODE_INVISIBLE;
ConfigFileEntry.failed_oper_notice = YES;
}
+ /* General conf */
+ if (ConfigFileEntry.default_operstring == NULL)
+ ConfigFileEntry.default_operstring = rb_strdup("is an IRC operator");
+
+ if (ConfigFileEntry.default_adminstring == NULL)
+ ConfigFileEntry.default_adminstring = rb_strdup("is a Server Administrator");
+
+ if (ConfigFileEntry.servicestring == NULL)
+ ConfigFileEntry.servicestring = rb_strdup("is a Network Service");
+
/* RFC 1459 says 1 message per 2 seconds on average and bursts of
* 5 messages are acceptable, so allow at least that.
*/
*/
/* clean out general */
+ rb_free(ConfigFileEntry.default_operstring);
+ ConfigFileEntry.default_operstring = NULL;
+ rb_free(ConfigFileEntry.default_adminstring);
+ ConfigFileEntry.default_adminstring = NULL;
+ rb_free(ConfigFileEntry.servicestring);
+ ConfigFileEntry.servicestring = NULL;
rb_free(ConfigFileEntry.kline_reason);
ConfigFileEntry.kline_reason = NULL;