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:
David Anderson
2007-03-19 01:29:29 +00:00
parent ee8780966d
commit c6375166a1
3 changed files with 30 additions and 11 deletions
+10
View File
@@ -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},
};
+11 -11
View File
@@ -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"