Merge pull request #263 from alliedmodders/admins-trans

Update admins.inc with methodmaps, newdecls (r=dvander, asherkin).
This commit is contained in:
Nicholas Hastings
2015-03-05 14:32:15 -05:00
12 changed files with 493 additions and 311 deletions
+3 -4
View File
@@ -982,7 +982,6 @@ void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild)
{
List<IAdminListener *>::iterator iter;
IAdminListener *pListener;
cell_t result;
if (part == AdminCache_Overrides)
{
@@ -996,7 +995,7 @@ void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild)
pListener->OnRebuildOverrideCache();
}
m_pCacheFwd->PushCell(part);
m_pCacheFwd->Execute(&result);
m_pCacheFwd->Execute();
}
} else if (part == AdminCache_Groups || part == AdminCache_Admins) {
if (part == AdminCache_Groups)
@@ -1010,7 +1009,7 @@ void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild)
pListener->OnRebuildGroupCache();
}
m_pCacheFwd->PushCell(part);
m_pCacheFwd->Execute(&result);
m_pCacheFwd->Execute();
}
}
InvalidateAdminCache(true);
@@ -1022,7 +1021,7 @@ void AdminCache::DumpAdminCache(AdminCachePart part, bool rebuild)
pListener->OnRebuildAdminCache((part == AdminCache_Groups));
}
m_pCacheFwd->PushCell(AdminCache_Admins);
m_pCacheFwd->Execute(&result);
m_pCacheFwd->Execute();
playerhelpers->RecheckAnyAdmins();
}
}
+23
View File
@@ -585,6 +585,29 @@ REGISTER_NATIVES(adminNatives)
{"SetAdmGroupImmunityLevel",SetAdmGroupImmunityLevel},
{"GetAdminImmunityLevel", GetAdminImmunityLevel},
{"SetAdminImmunityLevel", SetAdminImmunityLevel},
{"AdminId.GetUsername", GetAdminUsername},
{"AdminId.BindIdentity", BindAdminIdentity},
{"AdminId.SetFlag", SetAdminFlag},
{"AdminId.HasFlag", GetAdminFlag},
{"AdminId.GetFlags", GetAdminFlags},
{"AdminId.InheritGroup", AdminInheritGroup},
{"AdminId.GetGroup", GetAdminGroup},
{"AdminId.SetPassword", SetAdminPassword},
{"AdminId.GetPassword", GetAdminPassword},
{"AdminId.CanTarget", CanAdminTarget},
{"AdminId.GroupCount.get", GetAdminGroupCount},
{"AdminId.ImmunityLevel.get", GetAdminImmunityLevel},
{"AdminId.ImmunityLevel.set", SetAdminImmunityLevel},
{"GroupId.HasFlag", GetAdmGroupAddFlag},
{"GroupId.SetFlag", SetAdmGroupAddFlag},
{"GroupId.GetFlags", GetAdmGroupAddFlags},
{"GroupId.GetGroupImmunity", GetAdmGroupImmuneFrom},
{"GroupId.AddGroupImmunity", SetAdmGroupImmuneFrom},
{"GroupId.GetCommandOverride", GetAdmGroupCmdOverride},
{"GroupId.AddCommandOverride", AddAdmGroupCmdOverride},
{"GroupId.GroupImmunitiesCount.get", GetAdmGroupImmuneCount},
{"GroupId.ImmunityLevel.get", GetAdmGroupImmunityLevel},
{"GroupId.ImmunityLevel.set", SetAdmGroupImmunityLevel},
/* -------------------------------------------------- */
{NULL, NULL},
};