Purge Purge.
This commit is contained in:
parent
a541acb2bc
commit
70390ff1f7
@ -594,7 +594,6 @@ REGISTER_NATIVES(adminNatives)
|
|||||||
{"AdminId.GetGroup", GetAdminGroup},
|
{"AdminId.GetGroup", GetAdminGroup},
|
||||||
{"AdminId.SetPassword", SetAdminPassword},
|
{"AdminId.SetPassword", SetAdminPassword},
|
||||||
{"AdminId.GetPassword", GetAdminPassword},
|
{"AdminId.GetPassword", GetAdminPassword},
|
||||||
{"AdminId.Purge", RemoveAdmin},
|
|
||||||
{"AdminId.CanTarget", CanAdminTarget},
|
{"AdminId.CanTarget", CanAdminTarget},
|
||||||
{"AdminId.GroupCount.get", GetAdminGroupCount},
|
{"AdminId.GroupCount.get", GetAdminGroupCount},
|
||||||
{"AdminId.ImmunityLevel.get", GetAdminImmunityLevel},
|
{"AdminId.ImmunityLevel.get", GetAdminImmunityLevel},
|
||||||
|
@ -219,7 +219,7 @@ void ReadAdminLine(const char[] line)
|
|||||||
if (!admin.BindIdentity(auth_method, auth[auth_offset]))
|
if (!admin.BindIdentity(auth_method, auth[auth_offset]))
|
||||||
{
|
{
|
||||||
/* We should never reach here */
|
/* We should never reach here */
|
||||||
admin.Purge();
|
RemoveAdmin(admin);
|
||||||
ParseError("Failed to bind identity %s (method %s)", auth[auth_offset], auth_method);
|
ParseError("Failed to bind identity %s (method %s)", auth[auth_offset], auth_method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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. */
|
/* For dynamic admins we clear anything already in the cache. */
|
||||||
if ((adm = FindAdminByIdentity(authtype, identity)) != INVALID_ADMIN_ID)
|
if ((adm = FindAdminByIdentity(authtype, identity)) != INVALID_ADMIN_ID)
|
||||||
{
|
{
|
||||||
adm.Purge();
|
RemoveAdmin(adm);
|
||||||
}
|
}
|
||||||
|
|
||||||
adm = CreateAdmin(name);
|
adm = CreateAdmin(name);
|
||||||
|
@ -236,13 +236,6 @@ methodmap AdminId {
|
|||||||
// @return True if there was a password set, false otherwise.
|
// @return True if there was a password set, false otherwise.
|
||||||
public native bool GetPassword(char[] buffer="", maxlength=0);
|
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.
|
// Tests whether one admin can target another.
|
||||||
//
|
//
|
||||||
// The heuristics for this check are as follows:
|
// The heuristics for this check are as follows:
|
||||||
|
Loading…
Reference in New Issue
Block a user