removed privileged member from the client structure

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@506 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2011-12-12 09:50:23 +00:00
parent d17e6bfa52
commit 2503c74cb6
5 changed files with 10 additions and 16 deletions

View file

@ -564,7 +564,7 @@ void Host_God_f (void)
return;
}
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
//johnfitz -- allow user to explicitly set god mode to on or off
@ -609,7 +609,7 @@ void Host_Notarget_f (void)
return;
}
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
//johnfitz -- allow user to explicitly set notarget to on or off
@ -656,7 +656,7 @@ void Host_Noclip_f (void)
return;
}
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
//johnfitz -- allow user to explicitly set noclip to on or off
@ -712,7 +712,7 @@ void Host_Fly_f (void)
return;
}
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
//johnfitz -- allow user to explicitly set noclip to on or off
@ -1742,7 +1742,7 @@ void Host_Kick_f (void)
return;
}
}
else if (pr_global_struct->deathmatch && !host_client->privileged)
else if (pr_global_struct->deathmatch)
return;
save = host_client;
@ -1830,7 +1830,7 @@ void Host_Give_f (void)
return;
}
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
t = Cmd_Argv(1);

View file

@ -95,7 +95,7 @@ static void NET_Ban_f (void)
}
else
{
if (pr_global_struct->deathmatch && !host_client->privileged)
if (pr_global_struct->deathmatch)
return;
print_fn = SV_ClientPrintf;
}

View file

@ -84,7 +84,6 @@ typedef struct client_s
qboolean active; // false = client is free
qboolean spawned; // false = don't send datagrams
qboolean dropasap; // has been told to go to another level
qboolean privileged; // can execute any host command
qboolean sendsignon; // only valid before spawned
double last_message; // reliable messages must be sent

View file

@ -347,7 +347,6 @@ void SV_ConnectClient (int clientnum)
client->message.data = client->msgbuf;
client->message.maxsize = sizeof(client->msgbuf);
client->message.allowoverflow = true; // we can catch it
client->privileged = false;
if (sv.loadgame)
memcpy (client->spawn_parms, spawn_parms, sizeof(spawn_parms));

View file

@ -529,10 +529,7 @@ nextmsg:
case clc_stringcmd:
s = MSG_ReadString ();
if (host_client->privileged)
ret = 2;
else
ret = 0;
ret = 0;
if (Q_strncasecmp(s, "status", 6) == 0)
ret = 1;
else if (Q_strncasecmp(s, "god", 3) == 0)
@ -571,9 +568,8 @@ nextmsg:
ret = 1;
else if (Q_strncasecmp(s, "ban", 3) == 0)
ret = 1;
if (ret == 2)
Cbuf_InsertText (s);
else if (ret == 1)
if (ret == 1)
Cmd_ExecuteString (s, src_client);
else
Con_DPrintf("%s tried to %s\n", host_client->name, s);