if (++group_idx < 50) /* this is to reduce strlen calls */ \
continue; \
int group_len = strlen(group); \
- if (str_len + 1 + group_len >= 16383) /* exceeding max string length? */ \
+ if (str_len + 1 + group_len >= VM_TEMPSTRING_MAXSIZE) \
{ \
/* keep previous digests and replace current string with its digest */ \
s = strcat(substring(s, 0, digests_len), ":", digest_hex("MD4", s)); \
if(adding)
{
+ if (cvar_changes == "")
+ cvar_changes = "// this server runs at modified server settings:\n";
+
cvar_changes = strcat(cvar_changes, k, " \"", v, "\" // \"", d, "\"\n");
- if(strlen(cvar_changes) > 16384)
+ if(strlen(cvar_changes) >= VM_TEMPSTRING_MAXSIZE)
{
cvar_changes = "// too many settings have been changed to show them here\n";
adding = 0;
if(pureadding)
{
+ if (cvar_purechanges == "")
+ cvar_purechanges = "// this server runs at modified gameplay settings:\n";
+
cvar_purechanges = strcat(cvar_purechanges, k, " \"", v, "\" // \"", d, "\"\n");
- if(strlen(cvar_purechanges) > 16384)
+ if(strlen(cvar_purechanges) >= VM_TEMPSTRING_MAXSIZE)
{
cvar_purechanges = "// too many settings have been changed to show them here\n";
pureadding = 0;
// though.
}
buf_del(h);
+
if(cvar_changes == "")
cvar_changes = "// this server runs at default server settings\n";
- else
- cvar_changes = strcat("// this server runs at modified server settings:\n", cvar_changes);
cvar_changes = strzone(cvar_changes);
+
if(cvar_purechanges == "")
cvar_purechanges = "// this server runs at default gameplay settings\n";
- else
- cvar_purechanges = strcat("// this server runs at modified gameplay settings:\n", cvar_purechanges);
cvar_purechanges = strzone(cvar_purechanges);
}