forked from UNLOZE/sm-plugins
AdminGroups: Fix Sorting, and move include.
This commit is contained in:
@@ -210,7 +210,7 @@ public int Native_CreateAdminGroup(Handle hPlugin, int numParams)
|
||||
|
||||
G_hArray_AdminGroups.PushString(group);
|
||||
|
||||
SortADTArray(G_hArray_AdminGroups, Sort_Descending, Sort_String);
|
||||
SortADTArray(G_hArray_AdminGroups, Sort_Ascending, Sort_String);
|
||||
|
||||
CreateAdminGroup(group);
|
||||
}
|
||||
@@ -232,7 +232,7 @@ public int Native_DeleteAdminGroup(Handle hPlugin, int numParams)
|
||||
|
||||
G_hArray_AdminGroups.Erase(adminGroupIndex);
|
||||
|
||||
SortADTArray(G_hArray_AdminGroups, Sort_Descending, Sort_String);
|
||||
SortADTArray(G_hArray_AdminGroups, Sort_Ascending, Sort_String);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -273,7 +273,7 @@ public int Native_GrantAdminGroup(Handle hPlugin, int numParams)
|
||||
|
||||
G_hArray_ClientGroups[client].PushString(group);
|
||||
|
||||
SortADTArray(G_hArray_ClientGroups[client], Sort_Descending, Sort_String);
|
||||
SortADTArray(G_hArray_ClientGroups[client], Sort_Ascending, Sort_String);
|
||||
|
||||
GrantAdminGroup(client, group);
|
||||
}
|
||||
@@ -316,5 +316,5 @@ public int Native_RevokeAdminGroup(Handle hPlugin, int numParams)
|
||||
|
||||
G_hArray_ClientGroups[client].Erase(clientGroupIndex);
|
||||
|
||||
SortADTArray(G_hArray_ClientGroups[client], Sort_Descending, Sort_String);
|
||||
SortADTArray(G_hArray_ClientGroups[client], Sort_Ascending, Sort_String);
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#if defined _admingroups_included_
|
||||
#endinput
|
||||
#endif
|
||||
#define _admingroups_included_
|
||||
|
||||
/**
|
||||
* Create a admin group.
|
||||
*
|
||||
* @param group Name of the group to create.
|
||||
*/
|
||||
native void AdminGroups_CreateAdminGroup(const char[] group);
|
||||
|
||||
/**
|
||||
* Delete a admin group.
|
||||
*
|
||||
* @param group Name of the group to delete.
|
||||
*/
|
||||
native void AdminGroups_DeleteAdminGroup(const char[] group);
|
||||
|
||||
/**
|
||||
* Grant a admin group.
|
||||
*
|
||||
* @param client Client to grant to.
|
||||
* @param group Name of the group to grant.
|
||||
*/
|
||||
native void AdminGroups_GrantAdminGroup(int client, const char[] group);
|
||||
|
||||
/**
|
||||
* Revoke a admin group.
|
||||
*
|
||||
* @param client Client to revoke from.
|
||||
* @param group Name of the group to revoke.
|
||||
*/
|
||||
native void AdminGroups_RevokeAdminGroup(int client, const char[] group);
|
||||
Reference in New Issue
Block a user