mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Add mods revenge
This commit is contained in:
parent
291b6e5292
commit
5fedb7841d
7 changed files with 233 additions and 17 deletions
|
@ -4042,6 +4042,25 @@ namespace HISP.Server
|
|||
return instances;
|
||||
}
|
||||
}
|
||||
public static int[] GetModsAndAdmins()
|
||||
{
|
||||
List<int> userList = new List<int>();
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
|
||||
sqlCommand.CommandText = "SELECT id FROM Users WHERE Moderator=\"YES\" AND Admin=\"YES\"";
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
userList.Add(reader.GetInt32(0));
|
||||
}
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
return userList.ToArray();
|
||||
}
|
||||
|
||||
public static int[] GetUsers()
|
||||
{
|
||||
List<int> userList = new List<int>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue