Purge Purge.

This commit is contained in:
Nicholas Hastings 2015-03-05 10:56:36 -08:00
parent a541acb2bc
commit 70390ff1f7
4 changed files with 2 additions and 10 deletions

View File

@ -594,7 +594,6 @@ REGISTER_NATIVES(adminNatives)
{"AdminId.GetGroup", GetAdminGroup},
{"AdminId.SetPassword", SetAdminPassword},
{"AdminId.GetPassword", GetAdminPassword},
{"AdminId.Purge", RemoveAdmin},
{"AdminId.CanTarget", CanAdminTarget},
{"AdminId.GroupCount.get", GetAdminGroupCount},
{"AdminId.ImmunityLevel.get", GetAdminImmunityLevel},

View File

@ -219,7 +219,7 @@ void ReadAdminLine(const char[] line)
if (!admin.BindIdentity(auth_method, auth[auth_offset]))
{
/* We should never reach here */
admin.Purge();
RemoveAdmin(admin);
ParseError("Failed to bind identity %s (method %s)", auth[auth_offset], auth_method);
}
}

View File

@ -366,7 +366,7 @@ public void OnReceiveUser(Database db, DBResultSet rs, const char[] error, any d
/* For dynamic admins we clear anything already in the cache. */
if ((adm = FindAdminByIdentity(authtype, identity)) != INVALID_ADMIN_ID)
{
adm.Purge();
RemoveAdmin(adm);
}
adm = CreateAdmin(name);

View File

@ -236,13 +236,6 @@ methodmap AdminId {
// @return True if there was a password set, false otherwise.
public native bool GetPassword(char[] buffer="", maxlength=0);
// Purges an admin entry from the cache.
//
// @note This will remove any bindings to a specific user.
//
// @return True on success, false otherwise.
public native bool Purge();
// Tests whether one admin can target another.
//
// The heuristics for this check are as follows: