mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Add %UNBAN
This commit is contained in:
parent
49522e9fef
commit
3be40efc5e
4 changed files with 53 additions and 5 deletions
|
@ -53,7 +53,6 @@ namespace HISP.Server
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.DebugPrint(e.GetType().ToString());
|
||||
Logger.WarnPrint(e.Message);
|
||||
};
|
||||
|
||||
|
@ -667,6 +666,19 @@ namespace HISP.Server
|
|||
}
|
||||
}
|
||||
|
||||
public static void UnBanUser(int userId)
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "DELETE FROM BannedPlayers WHERE playerId=@playerId";
|
||||
sqlCommand.Parameters.AddWithValue("@playerId", userId);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool IsIpBanned(string ip)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue