Added manual section about admin authentication. Fixed ZRIsClientPrivileged ignoring console.
This commit is contained in:
parent
ffdf79f882
commit
b2d679c035
@ -136,7 +136,7 @@ td.valueoption
|
||||
{
|
||||
font-family: "Courier New", "Lucida Console";
|
||||
color: #000000;
|
||||
width: 125px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.container
|
||||
|
@ -119,6 +119,15 @@ Written by Richard Helgeby</p>
|
||||
<li><a href="#3.23.5">Class Editor</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#3.24">Admin Authentication</a>
|
||||
<ol>
|
||||
<li><a href="#3.24.1">Admin Flags Used In Zombie:Reloaded</a></li>
|
||||
<li><a href="#3.24.2">Predefined Admin Groups</a></li>
|
||||
<li><a href="#3.24.3">Console Variables</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
@ -3942,6 +3951,93 @@ can be displayed to player that enter the volume.</p>
|
||||
|
||||
<p>(Docs incomplete.)</p>
|
||||
|
||||
|
||||
<h3><a name="3.24" />3.24 Admin Authentication</h3>
|
||||
|
||||
<p>Zombie:Reloaded use SourceMod to authenticate players. There are two ways to do this; flag based
|
||||
or group based. With flag authentication a certain admin flag is required to be set, and with group
|
||||
authentication the player must be member of a certain group to do certain types of operations.</p>
|
||||
|
||||
<p>The reason to use group authentication could be to let admins have full access in SourceMod so
|
||||
they get access to configure all plugins, but still limit access to commands in Zombie:Reloaded.
|
||||
When using flag authentication the permissions will be global across all plugins, including
|
||||
Zombie:Reloaded.</p>
|
||||
|
||||
<h4><a name="3.24.1" />1. Admin Flags Used In Zombie:Reloaded</h4>
|
||||
|
||||
<p>Admins must have the appropriate
|
||||
<a href="http://wiki.alliedmods.net/Adding_Admins_(SourceMod)#Levels">SourceMod admin flags</a> to
|
||||
do certain types of operations. Below is a list of all flags used in Zombie:Reloaded and what type
|
||||
of operation they grant:</p>
|
||||
|
||||
<blockquote><table>
|
||||
<tr>
|
||||
<th>Flag:</th>
|
||||
<th>Operation type:</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="parameter">generic</td>
|
||||
<td>Access to generic operations like infecting, teleporting, and spawning players.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="parameter">config</td>
|
||||
<td>Access to operations that change settings in Zombie:Reloaded.</td>
|
||||
</tr>
|
||||
</table></blockquote>
|
||||
|
||||
<h4><a name="3.24.2" />2. Predefined Admin Groups</h4>
|
||||
|
||||
<p>If group authentication is used, admins must be member of one of these
|
||||
<a href="http://wiki.alliedmods.net/Adding_Groups_(SourceMod)">SourceMod groups</a> to do the
|
||||
following operations:</p>
|
||||
|
||||
<blockquote><table>
|
||||
<tr>
|
||||
<th>Group:</th>
|
||||
<th>Operation type:</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="valueoption">zr_admins</td>
|
||||
<td>Full access to all commands in Zombie:Reloaded.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="valueoption">zr_moderators</td>
|
||||
<td>Access to generic operations like infecting, teleporting, and spawning players.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="valueoption">zr_configurators</td>
|
||||
<td>Access to operations that change settings in Zombie:Reloaded.</td>
|
||||
</tr>
|
||||
</table></blockquote>
|
||||
|
||||
<h4><a name="3.24.3" />3. Console Variables</h4>
|
||||
|
||||
<blockquote><table>
|
||||
<tr>
|
||||
<th>Console variable:</th>
|
||||
<th>Default:</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="commandheader">zr_permissions_use_groups</td>
|
||||
<td class="commandheader">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="indent" colspan="2">
|
||||
<p>Use group authentication instead of flags to access admin features. Generic admin
|
||||
flag is still required on some features.</p>
|
||||
<p>Options:<br />
|
||||
0 or 1</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></blockquote>
|
||||
|
||||
|
||||
<h2><a name="4" />4. How To Play</h2>
|
||||
|
||||
<p>(Incomplete) Feel free to contribute to this section. Make a new thread with suggestions in the
|
||||
|
@ -55,6 +55,13 @@ enum OperationTypes
|
||||
*/
|
||||
stock bool:ZRIsClientPrivileged(client, OperationTypes:operationType = OperationType_Generic)
|
||||
{
|
||||
// Check if console.
|
||||
if (client == 0)
|
||||
{
|
||||
// Console always has full access no matter what.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Validate client index.
|
||||
if (!ZRIsClientValid(client))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user