#define ADMININTERFACE_MAXACCESSLENGTHTEXT 50 // This is the maximum length of a "flag" access text.
//#include "BATMenu.h"
//extern menuId g_AdminMenu;
classAdminInterfaceListner
{
public:
virtualvoidOnAdminInterfaceUnload()=0;
virtualvoidClient_Authorized(intid)=0;
};
classAdminInterface
{
public:
virtualboolRegisterFlag(constchar*Class,constchar*Flag,constchar*Description)=0;// Registers a new admin access
virtualboolIsClient(intid)=0;// returns false if client is bot, or NOT connected
virtualboolHasFlag(intid,constchar*Flag)=0;// returns true if the player has this access flag, lower case only
virtualintGetInterfaceVersion()=0;// Returns the interface version of the admin mod
virtualconstchar*GetModName()=0;// Returns the name of the current admin mod
virtualvoidAddEventListner(AdminInterfaceListner*ptr)=0;// You should ALLWAYS set this, so you know when the "server" plugin gets unloaded
virtualvoidRemoveListner(AdminInterfaceListner*ptr)=0;// You MUST CALL this function in your plugin unloads function, or the admin plugin will crash on next client connect.
};
classBATAdminInterface:publicAdminInterface
{
public:
boolRegisterFlag(constchar*Class,constchar*Flag,constchar*Description);// Max 1 admin access at the time, returns true if done successfully
boolIsClient(intid);// returns false if client is bot, or NOT connected
boolHasFlag(intid,constchar*Flag);// returns true if the player has this access flag
intGetInterfaceVersion(){returnADMININTERFACE_VERSION;}// Returns the interface version of the admin mod
constchar*GetModName(){return"BAT";}// Returns the name of the current admin mod
voidAddEventListner(AdminInterfaceListner*ptr);// You should ALLWAYS set this, so you know when the "server" plugin gets unloaded