Add mods revenge

This commit is contained in:
SilicaAndPina 2021-05-11 22:14:35 +12:00
parent 291b6e5292
commit 5fedb7841d
7 changed files with 233 additions and 17 deletions

View file

@ -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>();