added auth ident type creation
fixed some spacing issues --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40652
This commit is contained in:
parent
ee8780966d
commit
c6375166a1
@ -423,6 +423,15 @@ static cell_t CanAdminTarget(IPluginContext *pContext, const cell_t *params)
|
||||
return g_Admins.CanAdminTarget(params[1], params[2]) ? 1 : 0;
|
||||
}
|
||||
|
||||
static cell_t CreateAuthMethod(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
char *name;
|
||||
pContext->LocalToString(params[1], &name);
|
||||
g_Admins.RegisterAuthIdentType(name);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
REGISTER_NATIVES(adminNatives)
|
||||
{
|
||||
{"DumpAdminCache", DumpAdminCache},
|
||||
@ -460,6 +469,7 @@ REGISTER_NATIVES(adminNatives)
|
||||
{"FlagArrayToBits", FlagArrayToBits},
|
||||
{"FlagBitsToArray", FlagBitsToArray},
|
||||
{"CanAdminTarget", CanAdminTarget},
|
||||
{"CreateAuthMethod", CreateAuthMethod},
|
||||
/* -------------------------------------------------- */
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
@ -1,15 +1,15 @@
|
||||
/**
|
||||
* ===============================================================
|
||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* ===============================================================
|
||||
*
|
||||
* This file is not open source and may not be copied without explicit
|
||||
* written permission of AlliedModders LLC. This file may not be redistributed
|
||||
* in whole or significant part.
|
||||
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
* ===============================================================
|
||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* ===============================================================
|
||||
*
|
||||
* This file is not open source and may not be copied without explicit
|
||||
* written permission of AlliedModders LLC. This file may not be redistributed
|
||||
* in whole or significant part.
|
||||
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
#include "sm_globals.h"
|
||||
#include "PluginSys.h"
|
||||
|
@ -489,6 +489,15 @@ native FlagBitsToArray(bits, AdminFlag:array[], maxSize) =0;
|
||||
*/
|
||||
native CanAdminTarget(AdminId:admin, AdminId:target);
|
||||
|
||||
/**
|
||||
* Creates an admin auth method. This does not need to be called more than once
|
||||
* per method, ever.
|
||||
*
|
||||
* @param method Name of the authentication method.
|
||||
* @return True on success, false on failure.
|
||||
*/
|
||||
native bool:CreateAuthMethod(const String:method[]);
|
||||
|
||||
/**
|
||||
* Converts a flag to its single bit.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user