public/IAdminSystem.h File Reference

Defines the interface to manage the Admin Users/Groups and Override caches. More...

#include <IShareSys.h>

Include dependency graph for IAdminSystem.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  SourceMod

Classes

class  SourceMod::IAdminListener
 Provides callbacks for admin cache operations. More...
class  SourceMod::IAdminSystem
 Provides functions for manipulating the admin options cache. More...

Defines

#define SMINTERFACE_ADMINSYS_NAME   "IAdminSys"
#define SMINTERFACE_ADMINSYS_VERSION   5
#define ADMFLAG_RESERVATION   (1<<0)
#define ADMFLAG_GENERIC   (1<<1)
#define ADMFLAG_KICK   (1<<2)
#define ADMFLAG_BAN   (1<<3)
#define ADMFLAG_UNBAN   (1<<4)
#define ADMFLAG_SLAY   (1<<5)
#define ADMFLAG_CHANGEMAP   (1<<6)
#define ADMFLAG_CONVARS   (1<<7)
#define ADMFLAG_CONFIG   (1<<8)
#define ADMFLAG_CHAT   (1<<9)
#define ADMFLAG_VOTE   (1<<10)
#define ADMFLAG_PASSWORD   (1<<11)
#define ADMFLAG_RCON   (1<<12)
#define ADMFLAG_CHEATS   (1<<13)
#define ADMFLAG_ROOT   (1<<14)
#define ADMFLAG_CUSTOM1   (1<<15)
#define ADMFLAG_CUSTOM2   (1<<16)
#define ADMFLAG_CUSTOM3   (1<<17)
#define ADMFLAG_CUSTOM4   (1<<18)
#define ADMFLAG_CUSTOM5   (1<<19)
#define ADMFLAG_CUSTOM6   (1<<20)
#define INVALID_GROUP_ID   -1
 Represents an invalid/nonexistent group or an erroneous operation.
#define INVALID_ADMIN_ID   -1
 Represents an invalid/nonexistent user or an erroneous operation.

Typedefs

typedef int SourceMod::GroupId
 Represents an index to one group.
typedef int SourceMod::AdminId
 Represents an index to one user entry.
typedef unsigned int SourceMod::FlagBits
 Admin permission levels.

Enumerations

enum  SourceMod::AdminFlag {
  SourceMod::Admin_Reservation = 0, SourceMod::Admin_Generic, SourceMod::Admin_Kick, SourceMod::Admin_Ban,
  SourceMod::Admin_Unban, SourceMod::Admin_Slay, SourceMod::Admin_Changemap, SourceMod::Admin_Convars,
  SourceMod::Admin_Config, SourceMod::Admin_Chat, SourceMod::Admin_Vote, SourceMod::Admin_Password,
  SourceMod::Admin_RCON, SourceMod::Admin_Cheats, SourceMod::Admin_Root, SourceMod::Admin_Custom1,
  SourceMod::Admin_Custom2, SourceMod::Admin_Custom3, SourceMod::Admin_Custom4, SourceMod::Admin_Custom5,
  SourceMod::Admin_Custom6
}
 Access levels (flags) for admins. More...
enum  SourceMod::OverrideType { SourceMod::Override_Command = 1, SourceMod::Override_CommandGroup }
 Specifies which type of command to override (command or command group). More...
enum  SourceMod::OverrideRule { SourceMod::Command_Deny = 0, SourceMod::Command_Allow = 1 }
 Specifies how a command is overridden for a user group. More...
enum  SourceMod::ImmunityType { SourceMod::Immunity_Default = 1, SourceMod::Immunity_Global }
 DEPRECATED. Specifies a generic immunity type. More...
enum  SourceMod::AccessMode { SourceMod::Access_Real, SourceMod::Access_Effective }
 Defines user access modes. More...
enum  SourceMod::AdminCachePart { SourceMod::AdminCache_Overrides = 0, SourceMod::AdminCache_Groups = 1, SourceMod::AdminCache_Admins = 2 }
 Represents the various cache regions. More...


Detailed Description

Defines the interface to manage the Admin Users/Groups and Override caches.

The administration system is more of a volatile cache than a system. It is designed to be temporary rather than permanent, in order to compensate for more storage methods. For example, a flat file might be read into the cache all at once. But a MySQL-based system might only cache admin permissions when that specific admin connects.

The override cache is the simplest to explain. Any time an override is added, any existing and all future commands will gain a new access level set by the override. If unset, the default access level is restored. This cache is dynamically changeable.

The group cache contains, for each group: 1] A set of inherent flags - fully readable/writable. 2] An immunity table - insertion and retrieval only. 3] An override table - insertion and retrieval only. Individual groups can be invalidated entirely. It should be considered an expensive operation, since each admin needs to be patched up to not reference the group.

For more information, see the SourceMod Development wiki.

Definition in file IAdminSystem.h.


Define Documentation

#define SMINTERFACE_ADMINSYS_NAME   "IAdminSys"

vim: set ts=4 : ============================================================================= SourceMod Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. =============================================================================

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3.0, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

As a special exception, AlliedModders LLC gives you permission to link the code of this program (as well as its derivative works) to "Half-Life 2," the "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software by the Valve Corporation. You must obey the GNU General Public License in all respects for all other code used. Additionally, AlliedModders LLC grants this exception to all derivative works. AlliedModders LLC defines further exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), or <http://www.sourcemod.net/license.php>.

Version: $Id$

Definition at line 37 of file IAdminSystem.h.

#define ADMFLAG_RESERVATION   (1<<0)

Convenience macro for Admin_Reservation as a FlagBit

Definition at line 95 of file IAdminSystem.h.

#define ADMFLAG_GENERIC   (1<<1)

Convenience macro for Admin_Generic as a FlagBit

Definition at line 96 of file IAdminSystem.h.

#define ADMFLAG_KICK   (1<<2)

Convenience macro for Admin_Kick as a FlagBit

Definition at line 97 of file IAdminSystem.h.

#define ADMFLAG_BAN   (1<<3)

Convenience macro for Admin_Ban as a FlagBit

Definition at line 98 of file IAdminSystem.h.

#define ADMFLAG_UNBAN   (1<<4)

Convenience macro for Admin_Unban as a FlagBit

Definition at line 99 of file IAdminSystem.h.

#define ADMFLAG_SLAY   (1<<5)

Convenience macro for Admin_Slay as a FlagBit

Definition at line 100 of file IAdminSystem.h.

#define ADMFLAG_CHANGEMAP   (1<<6)

Convenience macro for Admin_Changemap as a FlagBit

Definition at line 101 of file IAdminSystem.h.

#define ADMFLAG_CONVARS   (1<<7)

Convenience macro for Admin_Convars as a FlagBit

Definition at line 102 of file IAdminSystem.h.

#define ADMFLAG_CONFIG   (1<<8)

Convenience macro for Admin_Config as a FlagBit

Definition at line 103 of file IAdminSystem.h.

#define ADMFLAG_CHAT   (1<<9)

Convenience macro for Admin_Chat as a FlagBit

Definition at line 104 of file IAdminSystem.h.

#define ADMFLAG_VOTE   (1<<10)

Convenience macro for Admin_Vote as a FlagBit

Definition at line 105 of file IAdminSystem.h.

#define ADMFLAG_PASSWORD   (1<<11)

Convenience macro for Admin_Password as a FlagBit

Definition at line 106 of file IAdminSystem.h.

#define ADMFLAG_RCON   (1<<12)

Convenience macro for Admin_RCON as a FlagBit

Definition at line 107 of file IAdminSystem.h.

#define ADMFLAG_CHEATS   (1<<13)

Convenience macro for Admin_Cheats as a FlagBit

Definition at line 108 of file IAdminSystem.h.

#define ADMFLAG_ROOT   (1<<14)

Convenience macro for Admin_Root as a FlagBit

Definition at line 109 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM1   (1<<15)

Convenience macro for Admin_Custom1 as a FlagBit

Definition at line 110 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM2   (1<<16)

Convenience macro for Admin_Custom2 as a FlagBit

Definition at line 111 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM3   (1<<17)

Convenience macro for Admin_Custom3 as a FlagBit

Definition at line 112 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM4   (1<<18)

Convenience macro for Admin_Custom4 as a FlagBit

Definition at line 113 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM5   (1<<19)

Convenience macro for Admin_Custom5 as a FlagBit

Definition at line 114 of file IAdminSystem.h.

#define ADMFLAG_CUSTOM6   (1<<20)

Convenience macro for Admin_Custom6 as a FlagBit

Definition at line 115 of file IAdminSystem.h.


Generated on Sun Dec 28 23:26:26 2008 for SourceMod SDK by  doxygen 1.5.1