git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8993
d7cf8633-e32d-0410-b094-
e92efae38249
{
char buf[1500];
char argbuf[1500];
{
char buf[1500];
char argbuf[1500];
- dpsnprintf(argbuf, sizeof(argbuf), "%ld.%06d %s", (long) time(NULL), (int) (random() % 1000000), Cmd_Args());
+ dpsnprintf(argbuf, sizeof(argbuf), "%ld.%06d %s", (long) time(NULL), (int) (rand() % 1000000), Cmd_Args());
memcpy(buf, "\377\377\377\377srcon HMAC-MD4 TIME ", 24);
if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, strlen(argbuf), (unsigned char *) rcon_password.string, strlen(rcon_password.string)))
{
memcpy(buf, "\377\377\377\377srcon HMAC-MD4 TIME ", 24);
if(HMAC_MDFOUR_16BYTES((unsigned char *) (buf + 24), (unsigned char *) argbuf, strlen(argbuf), (unsigned char *) rcon_password.string, strlen(rcon_password.string)))
{