cvar_t net_address = {0, "net_address", "", "network address to open ipv4 ports on (if empty, use default interfaces)"};
cvar_t net_address_ipv6 = {0, "net_address_ipv6", "", "network address to open ipv6 ports on (if empty, use default interfaces)"};
-char net_extresponse[NET_EXTRESPONSE_MAX][1400];
-int net_extresponse_count = 0;
-int net_extresponse_last = 0;
+char cl_net_extresponse[NET_EXTRESPONSE_MAX][1400];
+int cl_net_extresponse_count = 0;
+int cl_net_extresponse_last = 0;
char sv_net_extresponse[NET_EXTRESPONSE_MAX][1400];
int sv_net_extresponse_count = 0;
}
if (!strncmp(string, "extResponse ", 12))
{
- ++net_extresponse_count;
- if(net_extresponse_count > NET_EXTRESPONSE_MAX)
- net_extresponse_count = NET_EXTRESPONSE_MAX;
- net_extresponse_last = (net_extresponse_last + 1) % NET_EXTRESPONSE_MAX;
- dpsnprintf(net_extresponse[net_extresponse_last], sizeof(net_extresponse[net_extresponse_last]), "\"%s\" %s", addressstring2, string + 12);
+ ++cl_net_extresponse_count;
+ if(cl_net_extresponse_count > NET_EXTRESPONSE_MAX)
+ cl_net_extresponse_count = NET_EXTRESPONSE_MAX;
+ cl_net_extresponse_last = (cl_net_extresponse_last + 1) % NET_EXTRESPONSE_MAX;
+ dpsnprintf(cl_net_extresponse[cl_net_extresponse_last], sizeof(cl_net_extresponse[cl_net_extresponse_last]), "\"%s\" %s", addressstring2, string + 12);
return true;
}
if (!strncmp(string, "ping", 4))
++sv_net_extresponse_count;
if(sv_net_extresponse_count > NET_EXTRESPONSE_MAX)
sv_net_extresponse_count = NET_EXTRESPONSE_MAX;
- sv_net_extresponse_last = (net_extresponse_last + 1) % NET_EXTRESPONSE_MAX;
- dpsnprintf(sv_net_extresponse[sv_net_extresponse_last], sizeof(sv_net_extresponse[net_extresponse_last]), "'%s' %s", addressstring2, string + 12);
+ sv_net_extresponse_last = (sv_net_extresponse_last + 1) % NET_EXTRESPONSE_MAX;
+ dpsnprintf(sv_net_extresponse[sv_net_extresponse_last], sizeof(sv_net_extresponse[sv_net_extresponse_last]), "'%s' %s", addressstring2, string + 12);
return true;
}
if (!strncmp(string, "ping", 4))
//
//============================================================================
-extern char net_extresponse[NET_EXTRESPONSE_MAX][1400];
-extern int net_extresponse_count;
-extern int net_extresponse_last;
+extern char cl_net_extresponse[NET_EXTRESPONSE_MAX][1400];
+extern int cl_net_extresponse_count;
+extern int cl_net_extresponse_last;
extern char sv_net_extresponse[NET_EXTRESPONSE_MAX][1400];
extern int sv_net_extresponse_count;
{
VM_SAFEPARMCOUNT(0,VM_argv);
- if (net_extresponse_count <= 0)
+ if (cl_net_extresponse_count <= 0)
PRVM_G_INT(OFS_RETURN) = OFS_NULL;
else
{
int first;
- --net_extresponse_count;
- first = (net_extresponse_last + NET_EXTRESPONSE_MAX - net_extresponse_count) % NET_EXTRESPONSE_MAX;
- PRVM_G_INT(OFS_RETURN) = PRVM_SetEngineString(net_extresponse[first]);
+ --cl_net_extresponse_count;
+ first = (cl_net_extresponse_last + NET_EXTRESPONSE_MAX - cl_net_extresponse_count) % NET_EXTRESPONSE_MAX;
+ PRVM_G_INT(OFS_RETURN) = PRVM_SetEngineString(cl_net_extresponse[first]);
}
}