From b2d679c0353ff2e9de31a524ca2bfe8bd1d72281 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 21 Oct 2009 01:42:47 +0200 Subject: [PATCH] Added manual section about admin authentication. Fixed ZRIsClientPrivileged ignoring console. --- docs/zr.css | 2 +- docs/zr_manual.htm | 96 +++++++++++++++++++++++++++++++++++++++++++ src/zr/admintools.inc | 7 ++++ 3 files changed, 104 insertions(+), 1 deletion(-) diff --git a/docs/zr.css b/docs/zr.css index 3caf27b..15b377a 100644 --- a/docs/zr.css +++ b/docs/zr.css @@ -136,7 +136,7 @@ td.valueoption { font-family: "Courier New", "Lucida Console"; color: #000000; - width: 125px; + width: 150px; } .container diff --git a/docs/zr_manual.htm b/docs/zr_manual.htm index f46ffca..b249341 100644 --- a/docs/zr_manual.htm +++ b/docs/zr_manual.htm @@ -119,6 +119,15 @@ Written by Richard Helgeby

  • Class Editor
  • + +
  • + Admin Authentication +
      +
    1. Admin Flags Used In Zombie:Reloaded
    2. +
    3. Predefined Admin Groups
    4. +
    5. Console Variables
    6. +
    +
  • @@ -3942,6 +3951,93 @@ can be displayed to player that enter the volume.

    (Docs incomplete.)

    + +

    3.24 Admin Authentication

    + +

    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.

    + +

    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.

    + +

    1. Admin Flags Used In Zombie:Reloaded

    + +

    Admins must have the appropriate +SourceMod admin flags to +do certain types of operations. Below is a list of all flags used in Zombie:Reloaded and what type +of operation they grant:

    + +
    + + + + + + + + + + + + + + +
    Flag:Operation type:
    genericAccess to generic operations like infecting, teleporting, and spawning players.
    configAccess to operations that change settings in Zombie:Reloaded.
    + +

    2. Predefined Admin Groups

    + +

    If group authentication is used, admins must be member of one of these +SourceMod groups to do the +following operations:

    + +
    + + + + + + + + + + + + + + + + + + + +
    Group:Operation type:
    zr_adminsFull access to all commands in Zombie:Reloaded.
    zr_moderatorsAccess to generic operations like infecting, teleporting, and spawning players.
    zr_configuratorsAccess to operations that change settings in Zombie:Reloaded.
    + +

    3. Console Variables

    + +
    + + + + + + + + + + + + +
    Console variable:Default:
    zr_permissions_use_groups0
    +

    Use group authentication instead of flags to access admin features. Generic admin + flag is still required on some features.

    +

    Options:
    + 0 or 1

    +
    + +

    4. How To Play

    (Incomplete) Feel free to contribute to this section. Make a new thread with suggestions in the diff --git a/src/zr/admintools.inc b/src/zr/admintools.inc index e767679..725f7c4 100644 --- a/src/zr/admintools.inc +++ b/src/zr/admintools.inc @@ -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)) {